Skip to content

Commit

Permalink
[Python Otel] Remove opentelemetry version pin (#36448)
Browse files Browse the repository at this point in the history
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #36448

PiperOrigin-RevId: 629113962
  • Loading branch information
XuanWang-Amos authored and Copybara-Service committed Apr 29, 2024
1 parent f68f8e8 commit 79e42f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/python/observability/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
grpcio>=1.62.0
grpcio-observability>=1.62.0
opentelemetry-sdk==1.21.0
opentelemetry-sdk>=1.21.0
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -63,7 +63,6 @@ py_library(
"_open_telemetry_plugin.py",
],
deps = [
requirement("opentelemetry-sdk"),
requirement("opentelemetry-api"),
],
)
Expand Down
2 changes: 1 addition & 1 deletion src/python/grpcio_observability/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def extension_modules():
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,
Expand Down
4 changes: 4 additions & 0 deletions src/python/grpcio_tests/tests/observability/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"),
],
)

Expand Down

0 comments on commit 79e42f9

Please sign in to comment.