open-telemetry / opentelemetry-python

OpenTelemetry Python API and SDK
https://opentelemetry.io
Apache License 2.0
1.67k stars 570 forks source link

There are no deps listed for [opentelemetry-exporter-prometheus] #3899

Open davidshur opened 2 months ago

davidshur commented 2 months ago

Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.

[[package]]
name = "opentelemetry-exporter-prometheus"
version = "0.45b0"
description = ""
optional = false
python-versions = "*"
files = [
    {file = "opentelemetry_exporter_prometheus-0.45b0-py3-none-any.whl", hash = "sha256:101b0e00258d5c1cf6fa15e3920da8b9158bb303b333da0027cb52e6a8c425bd"},
    {file = "opentelemetry_exporter_prometheus-0.45b0.tar.gz", hash = "sha256:09461de02c7043285f818b12962de75c77d662555d05732f02d5acf8aaa6a92d"},
]

[package.source]
type = "legacy"

Steps to reproduce Describe exactly how to reproduce the error. Include a code sample if applicable. Use apache-airflow[otel]

What is the expected behavior? What did you expect to see? Should resolve otel deps.

What is the actual behavior? What did you see instead?

1239.3 The conflict is caused by:
1239.3     The user requested opentelemetry-sdk==1.20.0
1239.3     opentelemetry-exporter-otlp-proto-grpc 1.20.0 depends on opentelemetry-sdk~=1.20.0
1239.3     opentelemetry-exporter-otlp-proto-http 1.20.0 depends on opentelemetry-sdk~=1.20.0
1239.3     opentelemetry-exporter-prometheus 0.45b0 depends on opentelemetry-sdk~=1.24.0
1239.3 
1239.3 To fix this you could try to:
1239.3 1. loosen the range of package versions you've specified
1239.3 2. remove package versions to allow pip attempt to solve the dependency conflict

Additional context Add any other context about the problem here.

aabmass commented 1 month ago

There are no deps listed for [opentelemetry-exporter-prometheus]

@davidshur I'm a bit confused by the title. There are deps listed for this package https://github.com/open-telemetry/opentelemetry-python/blob/a156bf161d4de96766cac09a5ef4fcddbf367604/exporter/opentelemetry-exporter-prometheus/pyproject.toml#L27-L30

Steps to reproduce Describe exactly how to reproduce the error. Include a code sample if applicable. Use apache-airflow[otel]

I wasn't able to reproduce this in a fresh virtualenv with pip install apache-airflow[otel] opentelemetry-exporter-prometheus which leads to these OTel dependencies

pip list  | grep opentelemetry
opentelemetry-api                        1.24.0
opentelemetry-exporter-otlp              1.24.0
opentelemetry-exporter-otlp-proto-common 1.24.0
opentelemetry-exporter-otlp-proto-grpc   1.24.0
opentelemetry-exporter-otlp-proto-http   1.24.0
opentelemetry-exporter-prometheus        0.45b0
opentelemetry-proto                      1.24.0
opentelemetry-sdk                        1.24.0
opentelemetry-semantic-conventions       0.45b0
xrmx commented 1 month ago

I think the issue here is mixing versions of packasges from 1.24.0 and 1.20.0 opentelemetry releases.