| name | otel |
| description | Emit OTLP traces/spans/metrics to an OpenTelemetry collector. Use when: the user wants to instrument a workflow, debug latency, or fan out telemetry. NOT for: local logging (use memory_append). |
| metadata | {"all_agents":{"emoji":"📊"},"secrets":[{"name":"OTEL_EXPORTER_OTLP_ENDPOINT","description":"Base URL of your OTLP collector (e.g. http://localhost:4318)","required":true}]} |
OpenTelemetry
Use web_fetch to POST OTLP/JSON to your collector. Read
OTEL_EXPORTER_OTLP_ENDPOINT from the secret store first.
Emit one span
web_fetch {
url: "$OTEL_EXPORTER_OTLP_ENDPOINT/v1/traces",
method: "POST",
headers: { "Content-Type": "application/json" },
body: {
"resourceSpans": [{
"resource": { "attributes": [] },
"scopeSpans": [{
"scope": { "name": "all-agents" },
"spans": [{
"name": "your.event.name",
"startTimeUnixNano": <ns>,
"endTimeUnixNano": <ns>,
"attributes": [{ "key": "k", "value": { "stringValue": "v" } }]
}]
}]
}]
}
}
now returns ISO-8601; convert to nanoseconds: parse epoch seconds *
1_000_000_000.
If the endpoint is not configured, refuse — don't silently drop spans.