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

Convert gen_ai.operation.name to enum and use it on spans #1202

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Jul 2, 2024

Replaces #995

Changes

  • Converts gen_ai.operation.name to enum. Clarifies name for the chat operation.
  • Adds it to span attributes
  • Uses it in span name
  • adds minor clarifications for gen_ai.system

Merge requirement checklist

@lmolkova lmolkova requested review from a team July 2, 2024 20:55
@lmolkova lmolkova requested a review from a team July 2, 2024 20:57
@lmolkova lmolkova force-pushed the genai-span-name-and-operation branch from fe41b76 to 780a0eb Compare July 2, 2024 20:57
@lmolkova
Copy link
Contributor Author

lmolkova commented Jul 2, 2024

/cc @open-telemetry/semconv-llm-approvers

docs/attributes-registry/gen-ai.md Outdated Show resolved Hide resolved
docs/attributes-registry/gen-ai.md Outdated Show resolved Hide resolved
docs/attributes-registry/gen-ai.md Outdated Show resolved Hide resolved
docs/gen-ai/gen-ai-metrics.md Show resolved Hide resolved
docs/gen-ai/gen-ai-spans.md Outdated Show resolved Hide resolved
@lmolkova lmolkova force-pushed the genai-span-name-and-operation branch from d9c9f3a to 8786542 Compare July 5, 2024 14:29
Copy link
Member

@drewby drewby left a comment

Choose a reason for hiding this comment

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

Looks good.

@lmolkova lmolkova merged commit 92bd205 into open-telemetry:main Jul 10, 2024
12 checks passed
@codefromthecrypt
Copy link

drive by feedback, the description of this PR, while significantly changing a fundamental field (span name) does cover "what" like mechanics, but not "why"

Can we here and in the future put the motivation for renovations such as these, especially when doing things like enums we expect to break later? It will help be able to jump into a PR and not just assess, yeah.. this changes the span name, but also understand why we are considering it will drift all instrumenters.

@karthikscale3
Copy link
Contributor

Just wanted to add a note from Langtrace's point of view, regarding the convention for span names, it’s a bit tricky to make the change in our case for us since our SDK provides an option to disable tracing certain methods if the user wants more control and as a result we set span name as the method name. We will have to make some changes to the "disable tracing logic" if we update this - so treading a bit cautiously here. Will make this change pretty soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants