Skip to content

docs: Add custom OpenTelemetry tracing example#1134

Closed
haroldfabla2-hue wants to merge 2 commits intolivekit:mainfrom
haroldfabla2-hue:docs/trace-context-example
Closed

docs: Add custom OpenTelemetry tracing example#1134
haroldfabla2-hue wants to merge 2 commits intolivekit:mainfrom
haroldfabla2-hue:docs/trace-context-example

Conversation

@haroldfabla2-hue
Copy link
Copy Markdown
Contributor

This example demonstrates how to integrate LiveKit agents with custom OpenTelemetry tracing, allowing users to correlate LiveKit spans with their application's spans in a single trace tree.

Addresses feature request in issue #924

Alberto Farah added 2 commits March 7, 2026 03:36
- Wrap process.send in try-catch to handle channel close errors
- Return false instead of throwing when channel is closed (expected during shutdown)
- Log at debug level for expected closures, preserving for unexpected errors
- Allows job completion flow to continue gracefully

Fixes: livekit#1108, livekit#1080
This example demonstrates how to integrate LiveKit agents with
custom OpenTelemetry tracing, allowing users to correlate LiveKit
spans with their application's spans in a single trace tree.

Addresses feature request in issue livekit#924
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 16, 2026

⚠️ No Changeset found

Latest commit: 97f1bb4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Alberto Farah seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@livekit livekit deleted a comment from Toubat Mar 23, 2026
@livekit livekit deleted a comment from Toubat Mar 23, 2026
@toubatbrian
Copy link
Copy Markdown
Contributor

Thanks for the contribution! We generally keep examples in this repo focused on agent-specific functionality. This example is more about OpenTelemetry API usage, which is well covered by the OpenTelemetry JS documentation. Closing for now, but feel free to open an issue if you think there's an agent-specific tracing pattern we should document.

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.

3 participants