Skip to content

Add openai.api.type attribute to distinguish OpenAI API types#3337

Merged
lmolkova merged 5 commits intoopen-telemetry:mainfrom
singankit:users/singankit/responses_operation
Feb 17, 2026
Merged

Add openai.api.type attribute to distinguish OpenAI API types#3337
lmolkova merged 5 commits intoopen-telemetry:mainfrom
singankit:users/singankit/responses_operation

Conversation

@singankit
Copy link
Copy Markdown
Contributor

@singankit singankit commented Jan 26, 2026

Add openai.api.type attribute to distinguish OpenAI API types

Fixes #

Changes

Please provide a brief description of the changes here.

Important

Pull requests acceptance are subject to the triage process as described in Issue and PR Triage Management.
PRs that do not follow the guidance above, may be automatically rejected and closed.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

Comment thread model/gen-ai/registry.yaml Outdated
@singankit singankit requested a review from a team as a code owner January 27, 2026 02:58
@joaopgrassi joaopgrassi moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Feb 2, 2026
Comment thread model/gen-ai/registry.yaml Outdated
Comment thread model/gen-ai/registry.yaml Outdated
Comment thread model/gen-ai/registry.yaml Outdated
Comment thread docs/gen-ai/gen-ai-agent-spans.md Outdated
@github-actions github-actions Bot added enhancement New feature or request area:openai labels Feb 9, 2026
@singankit singankit changed the title Add responses operation value to gen_ai.operation.name Add openai.api.type attribute to distinguish OpenAI API types Feb 9, 2026
@singankit singankit force-pushed the users/singankit/responses_operation branch from e1ea320 to 04966b6 Compare February 10, 2026 00:05
Comment thread model/openai/registry.yaml
Comment thread model/openai/registry.yaml Outdated
Comment thread model/openai/registry.yaml Outdated
Comment thread model/openai/registry.yaml Outdated
Comment thread .chloggen/gen-ai-api-type.yaml Outdated
@singankit singankit force-pushed the users/singankit/responses_operation branch from 04966b6 to 9f63c01 Compare February 10, 2026 00:26
Add support for OpenAI Responses API operation type in the gen_ai.operation.name attribute.
…t enum

- Rename gen_ai.api.type to openai.api.type (OpenAI-specific attribute)
- Remove 'version' from brief description
- Change from free-form string to strict enum (chat_completions, responses)
- Remove stale 'responses' operation value from gen_ai.operation.name docs
- Update OpenAI registry docs with new attribute
@singankit singankit force-pushed the users/singankit/responses_operation branch from 72bdfed to 02d73dd Compare February 10, 2026 00:54
@lmolkova lmolkova moved this from Awaiting codeowners approval to Needs More Approval in Semantic Conventions Triage Feb 10, 2026
@lmolkova lmolkova added this pull request to the merge queue Feb 17, 2026
Merged via the queue into open-telemetry:main with commit 1b85ed6 Feb 17, 2026
18 checks passed
Copilot AI added a commit to dotnet/extensions that referenced this pull request Feb 17, 2026
Implements the OpenTelemetry semantic convention for distinguishing
OpenAI API types (open-telemetry/semantic-conventions#3337).

- OpenAIChatClient adds openai.api.type=chat_completions
- OpenAIResponsesChatClient adds openai.api.type=responses
- Both check Activity.Current for a matching "chat" span from OpenTelemetryChatClient
- Added tests for both streaming and non-streaming scenarios

Co-authored-by: stephentoub <[email protected]>
nagkumar91 pushed a commit to nagkumar91/semantic-conventions that referenced this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:openai enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants