Skip to content

feat: support OTel-aligned telemetry exporters in Agent CRD - #154

Merged
edenreich merged 1 commit into
mainfrom
feat/issue-153-20260715-1128
Jul 15, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/issue-153-20260715-1128

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Brings operator-deployed Agent telemetry in line with ADL schema v0.19.0 (follow-up from adl-cli #281). Agents deployed via the operator can now configure OTLP/Prometheus trace and metric exporters instead of just an on/off switch.

  • Extend the shared TelemetrySpec/MetricsSpec (api/v1alpha1) with traces.exporter.otlp{endpoint,protocol} and metrics.exporter.{otlp{endpoint,protocol},prometheus{host,port}}.
  • Map them onto the Go ADK's A2A_OTEL_* env vars in agent_controller.go, mirroring adl-cli's internal/templates/telemetry_env.go:
    • A2A_OTEL_TRACES_EXPORTER, A2A_OTEL_METRICS_EXPORTER (otlp/prometheus/none)
    • shared A2A_OTEL_EXPORTER_OTLP_{ENDPOINT,PROTOCOL} pair - the Go ADK exposes a single OTLP endpoint, so traces win and metrics fall back (adl-cli does the same)
    • A2A_OTEL_EXPORTER_PROMETHEUS_{HOST,PORT}
  • Reconcile the enable var: emit A2A_TELEMETRY_ENABLE (what the Go ADK actually reads) instead of the never-read TELEMETRY_ENABLED.
  • Regenerate CRDs, deepcopy and manifests/{crds,install}.yaml; update the sample + agent-server example; add controller tests for the mapping.

Note: TelemetrySpec is shared with the Gateway CRD, so the gateways CRD gains the same exporter schema. The Gateway controller ignores the new exporter fields (it deploys a different image), so behavior there is unchanged.

Downstream / follow-ups

  • Docs: the Agent CRD telemetry reference is user-facing and needs updating - a [DOCS] tracking issue is filed in inference-gateway/docs.

Closes #153

Extend the shared TelemetrySpec/MetricsSpec to match ADL schema v0.19.0
with traces.exporter.otlp and metrics.exporter.{otlp,prometheus}, and
map them onto the Go ADK's A2A_OTEL_* env vars in the Agent controller,
mirroring adl-cli's internal/templates/telemetry_env.go.

- Add TracesSpec/TracesExporterSpec/MetricsExporterSpec/OTLPExporterSpec/
  PrometheusExporterSpec; regenerate CRDs, deepcopy and manifests.
- Emit A2A_OTEL_TRACES_EXPORTER, A2A_OTEL_METRICS_EXPORTER, the shared
  A2A_OTEL_EXPORTER_OTLP_{ENDPOINT,PROTOCOL} pair (traces preferred) and
  A2A_OTEL_EXPORTER_PROMETHEUS_{HOST,PORT}.
- Reconcile the enable var: emit A2A_TELEMETRY_ENABLE (what the Go ADK
  reads) instead of the never-read TELEMETRY_ENABLED.
- Update sample + agent-server example and add controller tests.

Closes #153
@edenreich

Copy link
Copy Markdown
Contributor

@claude Can you create a follow-up feature request to also implement the orchestrator telemetry?

@edenreich
edenreich merged commit f28d85c into main Jul 15, 2026
1 check passed
@edenreich
edenreich deleted the feat/issue-153-20260715-1128 branch July 15, 2026 13:14
@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 4m 9s —— View job


Follow-up feature request created: #156

Filed #156 - [FEATURE] support OTel-aligned telemetry (traces/metrics exporters) in Orchestrator CRD (labeled enhancement), mirroring the structure of #153 which this PR (#154) closed.

Why it's a separate, non-trivial follow-up (not a copy-paste of #154)

The Orchestrator runs the infer channels-manager CLI, which reads a different env var family than the Agent, and it currently emits no telemetry vars at all:

Workload Binary / image Telemetry env prefix
Agent Go ADK image A2A_OTEL_* (done in #154)
Gateway inference-gateway image TELEMETRY_*
Orchestrator infer channels-manager CLI INFER_* - nothing emitted today

OrchestratorSpec has no Telemetry field and buildOrchestratorEnvironmentVars (internal/controller/orchestrator_controller.go) injects zero telemetry env vars. The issue proposes reusing the shared TelemetrySpec and flags the key open question: the exact INFER_TELEMETRY_* / INFER_OTEL_* names must be confirmed against the CLI config schema before the mapping can be written (it may even block on adding telemetry knobs to the CLI upstream first).

@edenreich edenreich moved this from Todo to Done in 2026 Jul 15, 2026
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 17, 2026
## [0.18.0](v0.17.1...v0.18.0) (2026-07-17)

### ✨ Features

* **orchestrator:** add OTel-aligned telemetry support to Orchestrator CRD ([#157](#157)) ([e06484e](e06484e))
* support OTel-aligned telemetry exporters in Agent CRD ([#154](#154)) ([f28d85c](f28d85c)), closes [#153](#153)

### 👷 CI

* **claude:** centralize claude.yml via reusable workflow ([#151](#151)) ([8cb48d5](8cb48d5))
* **deps:** bump golang.org/x/crypto ([#145](#145)) ([0a0172f](0a0172f))
* **deps:** bump golang.org/x/crypto ([#146](#146)) ([4eb7a02](4eb7a02))
* **infer:** centralize infer.yml via reusable workflow ([#148](#148)) ([9610fde](9610fde))
* **infer:** centralize infer.yml via reusable workflow ([#149](#149)) ([7e2584e](7e2584e))
* install prettier in infer/claude agent runs ([#158](#158)) ([18b11b4](18b11b4)), references [inference-gateway/.github#111](inference-gateway/.github#111)

### 🔧 Miscellaneous

* **deps:** bump claude-code 2.1.197 -> 2.1.201 ([#141](#141)) ([8fe274a](8fe274a))
* **deps:** bump claude-code-action v1.0.165 -> v1.0.169 ([#150](#150)) ([0383d9c](0383d9c))
* **deps:** bump infer CLI v0.130.1 -> v0.133.0, infer-action v0.24.0 -> v0.26.0 ([#142](#142)) ([1d8fe37](1d8fe37))
* **deps:** bump infer CLI v0.133.0 -> v0.133.1, infer-action v0.26.0 -> v0.27.1 ([#143](#143)) ([5391d03](5391d03))
* **deps:** bump infer CLI v0.133.1 -> v0.137.0, infer-action v0.27.1 -> v0.29.0 ([#144](#144)) ([1310de1](1310de1))
* **deps:** bump infer CLI v0.137.0 -> v0.138.0, infer-action v0.29.0 -> v0.30.1 ([#147](#147)) ([791b64e](791b64e))
* **deps:** bump infer CLI v0.138.0 -> v0.141.0 ([#152](#152)) ([8e2fb44](8e2fb44))
* **deps:** bump infer CLI v0.141.0 -> v0.147.1 ([#159](#159)) ([4b74a9f](4b74a9f))
* **release:** update GitHub App credentials to use RELEASER_APP_ID and RELEASER_APP_PRIVATE_KEY ([936dfc6](936dfc6))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.18.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] support OTel-aligned telemetry (traces/metrics exporters) in Agent CRD

1 participant