Skip to content

Update Emitted Chat Spans to be compliant with OTEL gen_ai spec's changes#83

Merged
aaditjuneja merged 1 commit intomainfrom
aadit/gen_ai_span_compliance
Jan 21, 2026
Merged

Update Emitted Chat Spans to be compliant with OTEL gen_ai spec's changes#83
aaditjuneja merged 1 commit intomainfrom
aadit/gen_ai_span_compliance

Conversation

@aaditjuneja
Copy link
Contributor

Update Emitted Chat Spans to be compliant with OTEL gen_ai spec's changes

Checklist

  • I have read both the CONTRIBUTING.md and Contributor License Agreement documents.
  • I have created an issue or feature request and received approval from xAI maintainers. (minor changes like fixing typos can skip this step)
  • I have tested my changes locally and they pass all CI checks.
  • I have added necessary documentation or updated existing documentation.

Type of Change

updating telemetry configuration

Summary of changes

Please refer to this to read about the reference gen_ai spec for OTEL.

Updates:

  • Emit xai under the gen_ai.provider.name field instead of the gen_ai.system field.
  • Emit server.address to be api.x.ai. I'm not sure if it's to hard code it as the prod endpoint (i.e. what if we are testing the sdk locally/staging). I could alternatively plumb the api_host field properly from the grpc channel creation for Client down to the clients for each of the individual clients for chat, image, etc. but I'd like to get others' thoughts on this.

Here is the reference documentation for OTEL gen_ai I am using.

@aaditjuneja aaditjuneja requested a review from a team as a code owner January 21, 2026 01:09
@aaditjuneja aaditjuneja force-pushed the aadit/gen_ai_span_compliance branch from 884b939 to 6bf2101 Compare January 21, 2026 18:38
@aaditjuneja aaditjuneja merged commit 145bf6b into main Jan 21, 2026
7 checks passed
@aaditjuneja aaditjuneja deleted the aadit/gen_ai_span_compliance branch January 21, 2026 18:40
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