Skip to content

feat(telemetry): accept INFERENCE_API_KEY as the ingest token (INF-4801) - #100

Merged
francescov1 merged 6 commits into
context-labs:mainfrom
inf-quantavius:quant/inf-4801-inference-api-key
Aug 14, 2026
Merged

feat(telemetry): accept INFERENCE_API_KEY as the ingest token (INF-4801)#100
francescov1 merged 6 commits into
context-labs:mainfrom
inf-quantavius:quant/inf-4801-inference-api-key

Conversation

@inf-quantavius

@inf-quantavius inf-quantavius commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

inference-catalyst-tracing 0.1.10 is published (carries context-labs/catalyst-tracing#33). Pin is ==0.1.10 — no release gate remains; merge when CI is green, then release halo-engine for monorepo#5446.

Engine half of INF-4801. Standalone halo-engine is a customer entrypoint, so the ingest token keeps undocumented legacy names at this one boundary. Internal consumers (monorepo runner / halo CLI wrapper) stay new-name-only.

  • Token (boundary): CATALYST_OTLP_TOKENOTLP_INGEST_TOKENINFERENCE_API_KEY. Old name wins; empty/whitespace is skipped so a blank leftover cannot block the new name. Resolved in engine/telemetry/setup.py and passed to catalyst_setup(token=…) explicitly (the SDK env chain never runs).
  • Docs / UI: zero CATALYST_* names. README, halo CLI help, app onboarding/import copy, and fire-test-spans docs all say INFERENCE_* / HALO_TRACING_* only.
  • Metadata passthrough: HALO_TRACING_<NAME> (still becomes halo.<name> resource attrs).
  • Service identity: INFERENCE_SERVICE_NAME / INFERENCE_SERVICE_VERSION, also passed explicitly to catalyst_setup.

Pairs with monorepo#5446 (injects INFERENCE_API_KEY only — no legacy needed there). Release order: catalyst-tracing SDKs (done) → this (halo-engine 0.3.5) → monorepo.

Tests: 53/53 telemetry unit tests.

Provenance


Note

Medium Risk
Changes how standalone customers authenticate OTLP export and which env vars enable hosted vs local tracing; behavior is backward-compatible via undocumented legacy token names but misconfiguration could misroute spans.

Overview
Documents and surfaces INFERENCE_API_KEY / INFERENCE_OTLP_ENDPOINT / HALO_TRACING_* (and related INFERENCE_SERVICE_*) instead of CATALYST_* in README, CLI help, and desktop onboarding/import/trace UI copy. Local agent setup now shows INFERENCE_OTLP_ENDPOINT=….

Engine telemetry routing in engine/telemetry/setup.py resolves the OTLP ingest token at the customer boundary (CATALYST_OTLP_TOKENOTLP_INGEST_TOKENINFERENCE_API_KEY, legacy names win, blanks skipped) and passes token, service_name, and service_version explicitly into catalyst_setup(). Run/session metadata passthrough moves from CATALYST_TRACING_* to HALO_TRACING_* (including resolve_run_id and conversation id). Pins inference-catalyst-tracing to 0.1.10.

CI: Engine E2E workflow no-ops authenticated steps on fork PRs (no Infisical secrets) so the required check stays green; live E2E still runs on same-repo PRs and release paths.

App dev tooling: fire-test-spans accepts INFERENCE_OTLP_ENDPOINT with CATALYST_OTLP_ENDPOINT as a fallback. Telemetry unit tests cover the new token precedence and forwarding.

Reviewed by Cursor Bugbot for commit 7dee503. Bugbot is set up for automated code reviews on this repo. Configure here.

quant added 2 commits August 12, 2026 11:10
CATALYST_OTLP_TOKEN still wins when both are set. The token is now passed
to catalyst_setup() explicitly so routing does not depend on which env
names the pinned SDK version reads (works with inference-catalyst-tracing
0.1.8, no pin bump needed).
…(INF-4801)

- Token: read INFERENCE_API_KEY only (CATALYST_OTLP_TOKEN no longer read).
- Metadata passthrough prefix: CATALYST_TRACING_<NAME> -> HALO_TRACING_<NAME>
  (incl. HALO_TRACING_RUN_ID / HALO_TRACING_CONVERSATION_ID).
- Service identity: INFERENCE_SERVICE_NAME / INFERENCE_SERVICE_VERSION,
  now also passed explicitly to catalyst_setup so behavior does not
  depend on which env names the pinned SDK reads.
- Pin inference-catalyst-tracing 0.1.9 (release carrying the INFERENCE_*
  env names — must be published before this merges).

The engine is only launched by the platform runtime (monorepo halo/src),
which switches to the new names in the paired monorepo PR, so no
backwards compatibility is kept here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b5bc779. Configure here.

Comment thread pyproject.toml Outdated
@inf-quantavius inf-quantavius changed the title feat(telemetry): accept INFERENCE_API_KEY as the ingest token (INF-4801) feat(telemetry): drop CATALYST_* env vars; INFERENCE_*/HALO_TRACING_* only (INF-4801) Aug 12, 2026
quant and others added 3 commits August 12, 2026 15:36
…INF-4801)

Standalone halo-engine is a customer entrypoint, so CATALYST_OTLP_TOKEN
and OTLP_INGEST_TOKEN still enable hosted export (old-name-wins, empty
skipped). Docs and UI copy mention only INFERENCE_* / HALO_TRACING_*.
@inf-quantavius inf-quantavius changed the title feat(telemetry): drop CATALYST_* env vars; INFERENCE_*/HALO_TRACING_* only (INF-4801) feat(telemetry): accept INFERENCE_API_KEY as the ingest token (INF-4801) Aug 14, 2026
Fork PRs do not receive INFISICAL_CLIENT_* so Authenticate Infisical
exits 1 before any test runs and the required E2E check stays red.
Skip the live suite on cross-fork PRs; keep it on same-repo PRs,
workflow_dispatch, and the engine release workflow_call.
@francescov1
francescov1 merged commit 5a5aa93 into context-labs:main Aug 14, 2026
5 checks passed
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