Telemetry
omfp exports OpenTelemetry traces, metrics and logs over OTLP/HTTP when the user’s init file turns it on; it sends
nothing otherwise. Only the user’s init file declares it (it is daemon-wide), and settings.get never shows it: its
headers may hold credentials.
import { langfuse, otlp } from "@omfp/otel";
export default (ctx) => { // Langfuse (traces only): endpoint <host>/api/public/otel, Basic authorization from the key pair. ctx.plugin(langfuse({ publicKey: "pk-lf-…", secretKey: "sk-lf-…" })); // Or any OTLP/HTTP collector (Jaeger, Grafana Alloy, the OpenTelemetry Collector, …): ctx.plugin(otlp({ endpoint: "http://localhost:4318" })); // Or the setting itself: ctx.settings({ telemetry: { endpoint: "http://localhost:4318", includeContent: true } });};| Key | Values |
|---|---|
endpoint |
OTLP base URL; each signal goes to <endpoint>/v1/traces, /v1/metrics, /v1/logs. Without it, telemetry is off. |
protocol |
http/protobuf (default) or http/json. |
headers |
Headers of every post, e.g. { authorization: "Bearer …" }. |
serviceName |
service.name (default omfp). |
sampling |
Share of traces kept, 0–1 (default 1); children follow their root’s decision. |
includeContent |
true puts prompts, replies, tool arguments and results, and job commands on spans (default false). |
metricsIntervalMs |
How often metrics are exported (default 60000, at least 100). |
resourceAttributes |
More resource attributes, e.g. { "deployment.environment": "laptop" }. |
signals |
Which of traces, metrics, logs (default all). |
Declarations merge key by key (headers and resourceAttributes as a whole); telemetry: null turns it off. Every
span, metric and log record carries omfp.host: kernel, thread/<id>, workspace/<id> or user.
- Every protocol method call: a server span named after the method (
rpc.method,omfp.client,omfp.client.kind; on failureerror.type= the error code). - Calls between the kernel and its hosts carry W3C trace context: one prompt is one trace across the kernel, the thread host, its subagents’ thread hosts and the workspace host (plugin tools, URI reads).
invoke_agent <agent kind>: one agent turn, with the thread, its depth and the turn’s token, cost and request totals.chat <model>: one model request, GenAI conventions (gen_ai.provider.name,gen_ai.request.model,gen_ai.response.model,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens), cost asomfp.cost.usd.execute_tool <name>: one tool call withomfp.approval.decision; itsapprovalchild span has the mode and whether the user was asked.job: one job run, ending withomfp.job.outcomeand the exit code.host.start,host.stop,host.exit: host lifecycle; a restart is a new trace linked to the failure.
Metrics
Section titled “Metrics”omfp.hosts.active, omfp.threads.active, omfp.model.requests, omfp.model.tokens (gen_ai.token.type),
omfp.model.cost, gen_ai.client.operation.duration, omfp.tool.duration, omfp.errors (omfp.error.kind,
error.type), omfp.job.runs (omfp.job.outcome).
The daemon’s log lines and every console line of a host (your plugins included) are log records with the trace and
span ids of the span they were written in.