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

Missing dependency to 'opentelemetry-semantic-conventions' #2862

Closed
enrico-stauss opened this issue Sep 11, 2024 · 2 comments · Fixed by #2873
Closed

Missing dependency to 'opentelemetry-semantic-conventions' #2862

enrico-stauss opened this issue Sep 11, 2024 · 2 comments · Fixed by #2873
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@enrico-stauss
Copy link

enrico-stauss commented Sep 11, 2024

Describe your environment

OS: Windows 11
Python version: 3.10
Package version: 0.47.0

What happened?

I recently introduced deepeval into my dependencies which seems to have produced a version conflict on my system. I believe the root cause to be the missing dependency specification to 'opentelemetry-semantic-conventions' in 'opentelemetry-instrumentation>=0.47.0'. In this file:

from opentelemetry.semconv.attributes.client_attributes import (
CLIENT_ADDRESS,
CLIENT_PORT,
)

the import from opentelemetry-semantic-conventions will fail if opentelemetry-semantic-conventions<=0.45.0b0 (or 1.24.0 I belive) as the attributes module was introduced only later.

Steps to Reproduce

In a fresh python env run: pip install deepeval opentelemetry-instrumentation and you will get an env with

opentelemetry-api                         1.24.0
opentelemetry-exporter-otlp-proto-common  1.24.0
opentelemetry-exporter-otlp-proto-grpc    1.24.0
opentelemetry-instrumentation             0.48b0
opentelemetry-proto                       1.24.0
opentelemetry-sdk                         1.24.0
opentelemetry-semantic-conventions        0.45b0

which will break from opentelemetry.instrumentation.instrumentor import BaseInstrumentor due to the imports in _semconv from the attributes module as described above.

Expected Result

Fixing the dependency to the appropriate version to avoid version conflicts

Actual Result

ImportError

Additional context

No response

Would you like to implement a fix?

None

@enrico-stauss enrico-stauss added the bug Something isn't working label Sep 11, 2024
@xrmx
Copy link
Contributor

xrmx commented Sep 11, 2024

Good catch, thanks for reporting.

@xrmx xrmx added the good first issue Good for newcomers label Sep 11, 2024
@shijiadong2022
Copy link
Contributor

I'd like to work on this one and submit a PR soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants