mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:00:42 +00:00
21 lines
662 B
TypeScript
21 lines
662 B
TypeScript
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
import { createDiagnosticsPrometheusExporter } from "./src/service.js";
|
|
|
|
const exporter = createDiagnosticsPrometheusExporter();
|
|
|
|
export default definePluginEntry({
|
|
id: "diagnostics-prometheus",
|
|
name: "Diagnostics Prometheus",
|
|
description: "Expose OpenClaw diagnostics metrics in Prometheus text format",
|
|
register(api) {
|
|
api.registerService(exporter.service);
|
|
api.registerHttpRoute({
|
|
path: "/api/diagnostics/prometheus",
|
|
auth: "gateway",
|
|
match: "exact",
|
|
gatewayRuntimeScopeSurface: "trusted-operator",
|
|
handler: exporter.handler,
|
|
});
|
|
},
|
|
});
|