diff --git a/examples/python/observability/requirements.txt b/examples/python/observability/requirements.txt index f7997817571..cb2d4d4b904 100644 --- a/examples/python/observability/requirements.txt +++ b/examples/python/observability/requirements.txt @@ -1,3 +1,3 @@ grpcio>=1.62.0 grpcio-observability>=1.62.0 -opentelemetry-sdk==1.21.0 +opentelemetry-sdk>=1.21.0 diff --git a/src/python/grpcio_observability/grpc_observability/BUILD.bazel b/src/python/grpcio_observability/grpc_observability/BUILD.bazel index 1a760338114..0ae6bb46db4 100644 --- a/src/python/grpcio_observability/grpc_observability/BUILD.bazel +++ b/src/python/grpcio_observability/grpc_observability/BUILD.bazel @@ -53,7 +53,7 @@ pyx_library( ], ) -# Since `opentelemetry-sdk` and `opentelemetry-api` are non-hermetic, +# Since `opentelemetry-api` is non-hermetic, # pyobservability is for internal use only. py_library( name = "_opentelemetry_observability", @@ -63,7 +63,6 @@ py_library( "_open_telemetry_plugin.py", ], deps = [ - requirement("opentelemetry-sdk"), requirement("opentelemetry-api"), ], ) diff --git a/src/python/grpcio_observability/setup.py b/src/python/grpcio_observability/setup.py index 53e7b3d8de7..3c7f45c9098 100644 --- a/src/python/grpcio_observability/setup.py +++ b/src/python/grpcio_observability/setup.py @@ -290,7 +290,7 @@ setuptools.setup( install_requires=[ "grpcio=={version}".format(version=grpc_version.VERSION), "setuptools>=59.6.0", - "opentelemetry-api==1.21.0", + "opentelemetry-api>=1.21.0", ], cmdclass={ "build_ext": BuildExt, diff --git a/src/python/grpcio_tests/tests/observability/BUILD.bazel b/src/python/grpcio_tests/tests/observability/BUILD.bazel index b7a531423a7..bcc1e618e42 100644 --- a/src/python/grpcio_tests/tests/observability/BUILD.bazel +++ b/src/python/grpcio_tests/tests/observability/BUILD.bazel @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +load("@grpc_python_dependencies//:requirements.bzl", "requirement") + package(default_visibility = ["//visibility:public"]) py_library( @@ -34,6 +37,7 @@ py_test( "//src/python/grpcio/grpc:grpcio", "//src/python/grpcio_observability/grpc_observability:pyobservability", "//src/python/grpcio_tests/tests/testing", + requirement("opentelemetry-sdk"), ], )