{"_id":"@apilium/mayros-diagnostics-otel","name":"@apilium/mayros-diagnostics-otel","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@apilium/mayros-diagnostics-otel","version":"0.1.1","description":"Mayros diagnostics OpenTelemetry exporter","license":"MIT","type":"module","publishConfig":{"access":"public"},"dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.212.0","@opentelemetry/exporter-logs-otlp-http":"^0.212.0","@opentelemetry/exporter-metrics-otlp-http":"^0.212.0","@opentelemetry/exporter-trace-otlp-http":"^0.212.0","@opentelemetry/resources":"^2.5.1","@opentelemetry/sdk-logs":"^0.212.0","@opentelemetry/sdk-metrics":"^2.5.1","@opentelemetry/sdk-node":"^0.212.0","@opentelemetry/sdk-trace-base":"^2.5.1","@opentelemetry/semantic-conventions":"^1.39.0"},"peerDependencies":{"@apilium/mayros":">=0.1.0"},"mayros":{"extensions":["./index.ts"]},"_id":"@apilium/mayros-diagnostics-otel@0.1.1","_integrity":"sha512-AHF5Z3hkdjnd2UNoXM9ZKy1jIuW8ZSCImLn1omg9igtPd83g0r7EtzV+wEYJJcmAG8ddKofV0mq+4qW2UwlSDw==","_resolved":"/private/var/folders/_y/k11qcrj94k32_yl6486p9bsc0000gn/T/2faedd21f5aff4e34ab5f41353f872d3/apilium-mayros-diagnostics-otel-0.1.1.tgz","_from":"file:apilium-mayros-diagnostics-otel-0.1.1.tgz","_nodeVersion":"24.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-AHF5Z3hkdjnd2UNoXM9ZKy1jIuW8ZSCImLn1omg9igtPd83g0r7EtzV+wEYJJcmAG8ddKofV0mq+4qW2UwlSDw==","shasum":"7dd6d98da08d79de829e7838837212ac88818e75","tarball":"https://registry.npmjs.org/@apilium/mayros-diagnostics-otel/-/mayros-diagnostics-otel-0.1.1.tgz","fileCount":7,"unpackedSize":37551,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDeptHYvzYKzsqhTPF5yuWSCeI8UUwYrKqGptlZSqkE+wIgLSFOgOHylXJEU02KV4VTbdgKD/C5n8YfmRsJHolxGaY="}]},"_npmUser":{"name":"apilium-ai","email":"it@apilium.com"},"directories":{},"maintainers":[{"name":"apilium-ai","email":"it@apilium.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mayros-diagnostics-otel_0.1.1_1772217425313_0.28328722355777103"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-27T18:37:05.204Z","0.1.1":"2026-02-27T18:37:05.486Z","modified":"2026-02-27T18:37:05.747Z"},"maintainers":[{"name":"apilium-ai","email":"it@apilium.com"}],"description":"Mayros diagnostics OpenTelemetry exporter","license":"MIT","readme":"# @apilium/mayros-diagnostics-otel\n\nMayros diagnostics OpenTelemetry exporter -- exports traces, metrics, and logs to any OTLP-compatible backend.\n\n## Installation\n\n```bash\nmayros plugin install @apilium/mayros-diagnostics-otel\n```\n\n## Configuration\n\nAdd to your `mayros.toml`:\n\n```toml\n[diagnostics]\nenabled = true\n\n[diagnostics.otel]\nenabled = true\nendpoint = \"http://localhost:4318\"   # OTLP HTTP endpoint\nserviceName = \"mayros\"               # service.name resource attribute\nprotocol = \"http/protobuf\"           # only http/protobuf is supported\nsampleRate = 1.0                     # trace sampling ratio (0.0 - 1.0)\ntraces = true                        # enable trace export\nmetrics = true                       # enable metric export\nlogs = false                         # enable log export (opt-in)\nflushIntervalMs = 5000               # export interval for metrics and logs\n# headers = { Authorization = \"Bearer ...\" }\n```\n\n## Environment Variables\n\n- `OTEL_EXPORTER_OTLP_ENDPOINT` -- fallback OTLP endpoint when `diagnostics.otel.endpoint` is not set\n- `OTEL_EXPORTER_OTLP_PROTOCOL` -- fallback protocol (default `http/protobuf`)\n- `OTEL_SERVICE_NAME` -- fallback service name (default `mayros`)\n\n## Exported Telemetry\n\n**Metrics:**\n\n- `mayros.tokens` -- token usage by type (input, output, cache_read, cache_write, total)\n- `mayros.cost.usd` -- estimated model cost\n- `mayros.run.duration_ms` -- agent run duration\n- `mayros.context.tokens` -- context window size and usage\n- `mayros.webhook.received` / `mayros.webhook.error` / `mayros.webhook.duration_ms`\n- `mayros.message.queued` / `mayros.message.processed` / `mayros.message.duration_ms`\n- `mayros.queue.depth` / `mayros.queue.wait_ms` / `mayros.queue.lane.*`\n- `mayros.session.state` / `mayros.session.stuck` / `mayros.session.stuck_age_ms`\n- `mayros.run.attempt`\n\n**Traces:** spans for model usage, webhook processing, message processing, and stuck sessions.\n\n**Logs:** structured log records forwarded from the Mayros logger (when `logs = true`).\n\n## License\n\nMIT -- Apilium Technologies\n","readmeFilename":"README.md","_rev":"1-4cfe0d026cf0885afc76fbd94eaf0696"}