Skip to content

feat: generate OpenTelemetry instrumentation for spec.telemetry.enabled (run did not finish) - #259

Merged
edenreich merged 3 commits into
mainfrom
feat/wip-174
Jul 14, 2026
Merged

edenreich merged 3 commits into
mainfrom
feat/wip-174

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Auto-saved partial work from a run that was cancelled before it finished (timed out or failed). For #174 - a maintainer can review this branch and continue it; there is no automatic resume.

Run: https://github.com/inference-gateway/adl-cli/actions/runs/29333819434

@edenreich

Copy link
Copy Markdown
Contributor

@claude Can you finalize this PR? /ponytail:ponytail

@inference-gateway-maintainer

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

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 22m 21s —— View job


OpenTelemetry instrumentation - finalized ✅

Picked up the partial spec.telemetry.enabled work (#174), verified the existing WIP, filled the gaps, and pushed fb7b3cf.

  • Reviewed partial changes against the ADL schema (TelemetryConfig is already vendored)
  • Verified Go generation: go build/go vet pass, OTel deps resolve, spans render in all 5 built-in tools
  • Verified TypeScript generation: tsc --noEmit passes (ADK 0.11.0 really does export createTelemetryProvider + createA2AServer({telemetry}))
  • Wired both telemetry examples into examples:test + examples:generate
  • Added tests (registry helpers, template rendering, and end-to-end generator on/off)
  • Fixed two latent issues the WIP left behind
  • Full suite green (go test ./...), go vet + gofmt clean, examples validate

What the WIP already had (kept)

Go: go.mod OTel deps, tools/telemetry.go span helper, per-tool-call spans in read/bash/write/edit/fetch, A2A_TELEMETRY_* in .env.example. TypeScript: TelemetryProvider wired into src/index.ts with proper start/shutdown lifecycle, TELEMETRY_ENABLE/OTEL_* in .env.example. Plus both example manifests.

What I fixed to finalize

  1. Taskfile wiring - the two new examples weren't in either regression list, so the smoke tests never exercised them (a repo convention in CLAUDE.md).
  2. Missing generated-code header - tools/telemetry.go was misclassified as user-owned tool code (any .go under tools/), so it shipped without the // Code generated by ADL CLI ... DO NOT EDIT. header every other generated file carries. internal/generator/generator.go now excludes the shared helper from that heuristic.
  3. Stale ADK version - the WIP bumped go.mod.tmpl to adk v0.22.0 but left GoBuiltins in internal/vendor/vendor.go at v0.19.0 (feeds the vendor-conflict warning message) and two generator-test assertions pinned to the old version -> tests were red. Synced all three.
  4. Tests - added internal/templates/registry_telemetry_test.go (helper + file-map + template-render coverage) and internal/generator/telemetry_test.go (hermetic end-to-end for telemetry on and off).

Notes / out of scope

  • Rust: telemetry is not wired for the Rust generator (there's no Rust telemetry example and the WIP didn't touch it). The feature is Go + TypeScript today; Rust would be a follow-up.
  • golangci-lint: I couldn't run it in this environment (the command wasn't permitted), so lint relies on CI. go vet and gofmt are clean on all touched files.
  • Noticed a pre-existing gofmt alignment drift in internal/generator/typescript_test.go on origin/main (unrelated to telemetry) - left it untouched to keep this PR focused.
    · branch feat/wip-174

inference-gateway-maintainer Bot and others added 2 commits July 14, 2026 13:40
Complete the partial spec.telemetry.enabled work:

- wire go/typescript telemetry examples into examples:test and
  examples:generate so the regression suite covers them
- stamp the DO NOT EDIT header on the generated tools/telemetry.go
  helper, which was misclassified as user-owned tool code
- sync GoBuiltins adk pin to v0.22.0 to match go.mod.tmpl (feeds
  vendor conflict warnings) and update the stale test assertions
- add registry/helper unit tests and an end-to-end generator test
  covering telemetry on and off
@edenreich edenreich changed the title wip: [FEATURE] Generate OpenTelemetry instrumentation for spec.telemetry.enabled (run did not finish) feat: generate OpenTelemetry instrumentation for spec.telemetry.enabled (run did not finish) Jul 14, 2026
@edenreich
edenreich marked this pull request as ready for review July 14, 2026 13:48
@edenreich
edenreich requested a review from a team as a code owner July 14, 2026 13:48
@edenreich
edenreich merged commit 2ef5918 into main Jul 14, 2026
1 check passed
@edenreich
edenreich deleted the feat/wip-174 branch July 14, 2026 13:49
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 14, 2026
## [0.46.0](v0.45.1...v0.46.0) (2026-07-14)

### ✨ Features

* generate OpenTelemetry instrumentation for spec.telemetry.enabled (run did not finish) ([#259](#259)) ([2ef5918](2ef5918))

### 👷 CI

* **claude:** centralize claude.yml via reusable workflow ([#257](#257)) ([914b942](914b942))
* **infer:** centralize infer.yml via reusable workflow ([#252](#252)) ([f80994e](f80994e))
* **infer:** centralize infer.yml via reusable workflow ([#253](#253)) ([992cef1](992cef1))
* **release:** update semantic release and plugins to latest versions with local installation ([c1e0b59](c1e0b59))

### 🔧 Miscellaneous

* **deps:** bump claude-code 2.1.197 -> 2.1.201 ([#245](#245)) ([64a12fb](64a12fb))
* **deps:** bump claude-code-action v1.0.168 -> v1.0.169 ([#256](#256)) ([89affdf](89affdf))
* **deps:** bump golang.org/x/crypto from 0.47.0 to 0.52.0 ([#249](#249)) ([2fac502](2fac502))
* **deps:** bump infer CLI v0.130.1 -> v0.133.0, infer-action v0.24.0 -> v0.26.0 ([#246](#246)) ([071eddb](071eddb))
* **deps:** bump infer CLI v0.133.0 -> v0.133.1, infer-action v0.26.0 -> v0.27.1 ([#247](#247)) ([6171e40](6171e40))
* **deps:** bump infer CLI v0.133.1 -> v0.137.0, infer-action v0.27.1 -> v0.29.0 ([#248](#248)) ([30a6ecf](30a6ecf))
* **deps:** bump infer CLI v0.137.0 -> v0.138.0, infer-action v0.29.0 -> v0.30.1 ([#250](#250)) ([281fcee](281fcee))
* **deps:** bump infer CLI v0.138.0 -> v0.141.0 ([#258](#258)) ([7bb0ae4](7bb0ae4))
* **deps:** bump inference-gateway/.github/.github/workflows/claude.yml ([#254](#254)) ([5aebddd](5aebddd))
* **deps:** bump the gomod group with 2 updates ([#255](#255)) ([acf83a0](acf83a0))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.46.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Jul 14, 2026
edenreich added a commit that referenced this pull request Jul 14, 2026
Adds the missing prose documentation for the telemetry feature (#259):
README Key Features bullet, ADL schema field entry, a Telemetry section
covering Go/TypeScript behavior and env vars (Rust unsupported), and a
CLAUDE.md architecture note.

Co-authored-by: Claude Fable 5 <[email protected]>
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 14, 2026
## [0.48.0](v0.47.1...v0.48.0) (2026-07-14)

### ✨ Features

* bump Go version to 1.26.4 ([#279](#279)) ([4945a28](4945a28))
* generate OTel-aligned telemetry configuration from extended spec.telemetry ([#281](#281)) ([47c5b3d](47c5b3d))

### 🐛 Bug Fixes

* quote boolean and numeric env values in compose template ([#267](#267)) ([6198824](6198824))

### 📚 Documentation

* add missing CLI flags to README generate/init flag tables ([#275](#275)) ([db0a842](db0a842))
* document spec.telemetry OpenTelemetry generation ([#277](#277)) ([bd75c08](bd75c08)), references [#259](#259)
* fix project structure diagrams and universal files section ([#274](#274)) ([17bad1b](17bad1b)), closes [#272](#272)
* mark Service Injection code examples as illustrative with template references ([#278](#278)) ([69b9806](69b9806))
* remove missing example ref, document all examples ([#273](#273)) ([4e30aff](4e30aff)), closes [#268](#268)
* update Template System and Architecture section with accurate Context struct and file mapping ([#276](#276)) ([352d084](352d084))
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

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Generate OpenTelemetry instrumentation for spec.telemetry.enabled

1 participant