Skip to content

Wire OpenTelemetry into ClassifiersExample#117

Merged
Andrew Kent (realark) merged 1 commit into
mainfrom
qard/classifiers-example-otel-init
May 29, 2026
Merged

Wire OpenTelemetry into ClassifiersExample#117
Andrew Kent (realark) merged 1 commit into
mainfrom
qard/classifiers-example-otel-init

Conversation

@Qard
Copy link
Copy Markdown
Contributor

Summary

  • Add the missing braintrust.openTelemetryCreate() call to ClassifiersExample so spans actually reach Braintrust. Every other example already does this immediately after Braintrust.get().

Background

When the classifier feature merged (#114) and the examples were subsequently reorganised into per-example subprojects (#116), ClassifiersExample was the only example left without an explicit OpenTelemetry initialisation. As a result, running ./gradlew :examples:classifiers:run would create the experiment via REST but the eval spans would land on the no-op tracer and never be exported, leaving the experiment empty in the UI.

Test plan

  • ./gradlew :examples:classifiers:run against the Braintrust SDKs org — printed experiment now contains five root spans (BTQL count(_xact_id) returns 5).
  • VCR_MODE=replay ./gradlew :braintrust-sdk:test --tests '*ClassifierEvalTest*' — no regression.

Note: the new rows currently land with classifications: null because the api-ts OTEL ingestion doesn't yet recognise braintrust.classifications — the JSON falls through to row metadata. That gap is being addressed separately in the braintrust monorepo. This PR is strictly the SDK-side fix that gets the spans flowing at all.

🤖 Generated with Claude Code

Without `braintrust.openTelemetryCreate()` the eval runs against the
no-op tracer and no spans reach Braintrust, so the experiment shows up
empty in the UI despite the REST experiment record being created. Every
other example under examples/ already makes this call right after
`Braintrust.get()` (see e.g. examples/experiment/.../ExperimentExample.java).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@realark Andrew Kent (realark) merged commit 4c29ebf into main May 29, 2026
1 check passed
@realark Andrew Kent (realark) deleted the qard/classifiers-example-otel-init branch May 29, 2026 19:13
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.

2 participants