-
Notifications
You must be signed in to change notification settings - Fork 607
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
OpenAI instrumentation docs fixes #2988
base: main
Are you sure you want to change the base?
Conversation
lmolkova
commented
Nov 9, 2024
•
edited
Loading
edited
- updates broken homepage link to https://pypi.org/project/opentelemetry-instrumentation-openai-v2
- adds docs config
- adds usage samples to readme
], | ||
) | ||
Enabling message content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this snippet about configuring logs and events meant to be in here, too? open-telemetry/opentelemetry.io#5575 (comment)
************************* | ||
|
||
When using the instrumentor, all clients will automatically trace OpenAI chat completion operations | ||
and capture prompts and completions as events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only happens when OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT
is set as true
, right? Can we highlight the parameter here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worthwhile putting the example (json) format of the content shape that is emitted.
Also might be worth stating that if doing this you may have to configure your pipeline to redact any sensitive info contained in the content.
When using the instrumentor, all clients will automatically trace OpenAI chat completion operations | ||
and capture prompts and completions as events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar thought to @gyliu513 and also I don't think most people know what events are yet, specifically they are log not span. Maybe adding the word log helps?
When using the instrumentor, all clients will automatically trace OpenAI chat completion operations | |
and capture prompts and completions as events. | |
When using the instrumentor, all clients will automatically trace OpenAI chat completion operations. | |
You can also optionally capture prompts and completions as log events, discussed later. |
************************* | ||
|
||
Message content such as the contents of the prompt, completion, function arguments and return values | ||
are not captured by default. To enable message content, set the environment variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are not captured by default. To enable message content, set the environment variable | |
are not captured by default. To capture message content as log events, set the environment variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a doco or something related to setting up log events instrumentation that can be linked in place here? Most existing apps will not have log events provider setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karthikscale3 just confirming we are using log events and not span events for this even in the interim?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using span events in the interim at the moment - https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2759/files?diff=unified&w=0#diff-954647898e3f111e390e80f228b8d86a8df076df8f43496783d6f8660a5f29aaR118
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dasiths open-telemetry/opentelemetry-python#4269 has the patch for log event enabling, but that will only work if your backend/collector accepts logs.