-
Notifications
You must be signed in to change notification settings - Fork 798
Update openai
instrumentation to use Logs API instead of the deprecated events API
#3628
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
Conversation
Tests passing now |
ACtually before this goes in I think we need to update the SDK Logger to attach the resource to the LogRecord like the SDK EventLogger does: https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py#L654-L764 |
instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py
Show resolved
Hide resolved
Ok in the latest upstream version resource is now attached by the logger in We can go forward with this PR. |
instrumentation-genai/opentelemetry-instrumentation-openai-v2/pyproject.toml
Outdated
Show resolved
Hide resolved
...opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml
Outdated
Show resolved
Hide resolved
instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md
Show resolved
Hide resolved
instrumentation-genai/opentelemetry-instrumentation-openai-v2/pyproject.toml
Outdated
Show resolved
Hide resolved
…thon-contrib into fix_openai
Description
Move
openai
instrumentation from the deprecated events API to the logs API. Also update all gen ai code examples to stop using events.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I've updated the existing unit tests to all pass.
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.