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

elastic-opentelemetry-instrumentation-openai: match proposed upstream semconv #36

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

xrmx
Copy link
Member

@xrmx xrmx commented Nov 27, 2024

What does this pull request do?

Update attributes to match
open-telemetry/semantic-conventions#1603

Related issues

@xrmx xrmx requested a review from trentm November 27, 2024 14:53
@@ -117,7 +117,7 @@ def test_all_the_client_options(provider_str, model, input_tokens, duration, tra
GEN_AI_REQUEST_MODEL: model,
GEN_AI_SYSTEM: "openai",
GEN_AI_RESPONSE_MODEL: model,
GEN_AI_REQUEST_ENCODING_FORMAT: "float",
GEN_AI_REQUEST_ENCODING_FORMATS: ("float",),
Copy link
Member

Choose a reason for hiding this comment

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

Possibly showing my ignorance here. The code sets value of this attribute to a list, but compares it to a tuple here. Why does the == comparison return True?

>>> {"foo":1, "bar":["float"]} == {"foo":1, "bar":("float",)}
False

Copy link
Member Author

@xrmx xrmx Nov 27, 2024

Choose a reason for hiding this comment

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

Lists ends up as tuples for some reason in tests, haven't digged much on where this happens.

@xrmx xrmx merged commit 1720368 into main Nov 28, 2024
14 checks passed
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