Skip to content

feat: Add server telemetry endpoint and structured JSON logging - #10

Merged
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/server-telemetry
Jul 27, 2026
Merged

feat: Add server telemetry endpoint and structured JSON logging#10
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/server-telemetry

Conversation

@ThomasHartDev

Copy link
Copy Markdown
Owner

Wires GET /telemetry on the Hono server so scrapers can pull nearest-rank p50/p95/p99 for LLM and tool spans that the agent loop already records. Empty series come back as zeros so a dashboard can poll before any traffic. Same path stays outside the rate-limit middleware so probes do not burn client tokens.

Also added a small JSON logger that writes one object per line (ts, level, requestId, method, path, status, durationMs) and echoes or mints X-Request-Id. Makes the server logs actually joinable when it ends up in a container. Tests cover the percentile edge cases and the request log path.

Expose GET /telemetry with nearest-rank p50/p95/p99 for LLM and tool
spans, plus one-line JSON request logs with X-Request-Id correlation.
@ThomasHartDev
ThomasHartDev merged commit 53dad4e into main Jul 27, 2026
1 check passed
@ThomasHartDev
ThomasHartDev deleted the thomas/feat/server-telemetry branch July 27, 2026 16:30
Comment thread packages/agent-core/src/telemetry.ts
Comment thread apps/server/src/create-app.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant