Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tracing] Add support for addEvent #31158

Closed
maorleger opened this issue Sep 18, 2024 · 0 comments · Fixed by #31162
Closed

[tracing] Add support for addEvent #31158

maorleger opened this issue Sep 18, 2024 · 0 comments · Fixed by #31162
Assignees
Milestone

Comments

@maorleger
Copy link
Member

AI Inference library needs to be able to use OTel's addEvent API so we need to add it to core-tracing.

From this POC: https://github.com/Azure/azure-sdk-for-js/pull/31157/files

@maorleger maorleger self-assigned this Sep 18, 2024
@maorleger maorleger added this to the 2024-10 milestone Sep 18, 2024
maorleger added a commit that referenced this issue Sep 20, 2024
### Packages impacted by this PR

@azure/core-tracing
@azure/opentelemetry-instrumentation-azure-sdk
@typespec/ts-http-runtime

### Issues associated with this PR

Resolves #31158

### Describe the problem that is addressed by this PR

OpenTelemetry supports adding events to a span, and part of the gen-ai
specification expects events to be added on a span. 

This PR adds support for the `addEvent` API in our core-tracing library
as well as our otel-sdk.

Adding a required field is a breaking change, so this is added as
optional. The implementation will need to use the safe-navigation 
operator syntax or check for the function's existence before calling it.

In passing, I am updating some of our internal transformations to use
OTel's APIs instead.
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 a pull request may close this issue.

1 participant