OpenTelemetry for the Claude Code of every session #4

Merged
mikluko merged 1 commit from feat/claude-otel into main 2026-11-17 15:05:12 +00:00
Owner

Based on #3 (feat/session-resume), which is not merged; retarget to main after it merges.

New [telemetry] table: endpoint, protocol (default http/protobuf; also http/json, grpc), resource_attributes (values may use {agent}/{session}). The Job puts OTEL_EXPORTER_OTLP_ENDPOINT, _PROTOCOL and OTEL_RESOURCE_ATTRIBUTES in each pod. The host already sets claudeacp ExportTelemetry (metrics and logs); it now also sets CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 and OTEL_TRACES_EXPORTER=otlp when the pod's environment names an OTLP endpoint, keeping values already set. No endpoint: no OTEL variable in the pod, nothing exported.

The city must provide: [telemetry] endpoint in akephalos.toml (and optionally resource_attributes), and a collector reachable from the session pods. Collector authentication headers are not supported.

Tests: the Job's OTEL environment (with and without endpoint, protocol, escaped attributes); the environment Claude receives from the host with and without an endpoint; config validation.

Based on #3 (`feat/session-resume`), which is not merged; retarget to main after it merges. New `[telemetry]` table: `endpoint`, `protocol` (default `http/protobuf`; also `http/json`, `grpc`), `resource_attributes` (values may use `{agent}`/`{session}`). The Job puts `OTEL_EXPORTER_OTLP_ENDPOINT`, `_PROTOCOL` and `OTEL_RESOURCE_ATTRIBUTES` in each pod. The host already sets claudeacp `ExportTelemetry` (metrics and logs); it now also sets `CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1` and `OTEL_TRACES_EXPORTER=otlp` when the pod's environment names an OTLP endpoint, keeping values already set. No endpoint: no OTEL variable in the pod, nothing exported. **The city must provide:** `[telemetry] endpoint` in akephalos.toml (and optionally `resource_attributes`), and a collector reachable from the session pods. Collector authentication headers are not supported. Tests: the Job's OTEL environment (with and without endpoint, protocol, escaped attributes); the environment Claude receives from the host with and without an endpoint; config validation.
OpenTelemetry for the Claude Code of every session
All checks were successful
test / changelog (pull_request) Successful in 5s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 47s
9011fc12ad
A [telemetry] table gives the Job OTEL_EXPORTER_OTLP_ENDPOINT, _PROTOCOL and
OTEL_RESOURCE_ATTRIBUTES. A host whose pod names an OTLP endpoint starts
Claude Code with traces on as well as claudeacp's metrics and logs. No
endpoint, no export.

Assisted-By: Claude <noreply@anthropic.com>
mikluko force-pushed feat/claude-otel from 9011fc12ad
All checks were successful
test / changelog (pull_request) Successful in 5s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 47s
to cb71d1e9fd
Some checks failed
test / changelog (pull_request) Failing after 3s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 1m8s
2026-11-17 14:43:14 +00:00
Compare
mikluko changed target branch from feat/session-resume to main 2026-11-17 14:43:41 +00:00
mikluko force-pushed feat/claude-otel from cb71d1e9fd
Some checks failed
test / changelog (pull_request) Failing after 3s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 1m8s
to 3f8569ec07
All checks were successful
image / image (pull_request) Successful in 4s
test / changelog (pull_request) Successful in 5s
test / go (pull_request) Successful in 1m7s
2026-11-17 14:44:35 +00:00
Compare
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascity-ak6s-pack!4
No description provided.