Skip to content

Port the generic onStart/onEnd telemetry callbacks for decide - #1900

Merged
kblok merged 2 commits into
mainfrom
fix/1862-telemetry-onstart-onend
Nov 19, 2026
Merged

kblok merged 2 commits into
mainfrom
fix/1862-telemetry-onstart-onend

Conversation

@kblok

@kblok kblok commented Nov 19, 2026

Copy link
Copy Markdown
Member

Closes #1862

What

ITelemetry now has the generic OnStartAsync / OnEndAsync callbacks that upstream's Telemetry has (onStart / onEnd), and the telemetry dispatcher merges them. decide must not call them, and a test now asserts that. Value: integrations written against upstream's interface shape port 1:1, and the two decide.test.ts assertions (onStart/onEnd not called) can be ported.

Upstream parity

Verdict: complete, with the justified exceptions below.

  • Upstream: packages/ai/src/telemetry/telemetry.ts (onStart, onEnd) and create-telemetry-dispatcher.ts (mergeTelemetryCallback('onStart'/'onEnd')).
  • ITelemetry.OnStartAsync / OnEndAsync (default no-op)
  • TelemetryDispatcher.OnStartAsync / OnEndAsync (augment + merge, isolated per integration)
  • decide does not call them
  • Docs: decision-models.mdx, skills/e2e-dotnet/references/agent.md

Port-only / deviations:

  • The event parameter is TelemetryEvent (the base record), because upstream's OperationStartEvent/OperationEndEvent unions only cover operations (text, object, embed, rerank, speech, transcription) this port does not have. No filtering is applied since the base event has no inputs/outputs to hide.

Upstream tests

Upstream (decide.test.ts, describe('telemetry')) Local
emits operation and model-call lifecycle events (onStart/onEnd not called) TelemetryTests.Partial_emits_operation_and_model_call_lifecycle_events, now asserts Starts/Ends are empty

Not ported

Nothing new. Test run (net10.0): all Decide tests pass (57). 4 tests in DecisionExecutorThroughTheBuiltCliAndRealChromiumTests fail in this sandbox at Chromium launch, unrelated to this change.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 80e2290 and 0ee83ea.

Files selected for processing: 6

  • docs-site/src/content/docs/docs/decision-models.mdx
  • skills/e2e-dotnet/references/agent.md
  • src/E2E.Decision/Sdk/CreateTelemetryDispatcher.cs
  • src/E2E.Decision/Sdk/Telemetry.cs
  • tests/E2E.Decision.Tests/Decide/DecideTestHelpers.cs
  • tests/E2E.Decision.Tests/Decide/TelemetryTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kblok
kblok merged commit 98b6170 into main Nov 19, 2026
5 checks passed
@kblok
kblok deleted the fix/1862-telemetry-onstart-onend branch November 19, 2026 23:42
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.

Port the generic onStart/onEnd telemetry integration callbacks for decide

2 participants