-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python O11y] Implement CSM observability for Python (grpc#36557)
Implement Python CSM observability. Design: [go/grpc-python-opentelemetry](http://goto.google.com/grpc-python-opentelemetry) <!-- 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 grpc#36557 PiperOrigin-RevId: 639073741
- Loading branch information
1 parent
7ccb51e
commit f3220d0
Showing
45 changed files
with
2,634 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
graft src/python/grpcio_csm_observability/grpc_csm_observability.egg-info | ||
graft grpc_csm_observability | ||
include grpc_version.py | ||
include README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
gRPC Python CSM Observability | ||
========================= | ||
|
||
Package for gRPC Python CSM Observability. | ||
TODO(xuanwn): Add more content. |
36 changes: 36 additions & 0 deletions
36
src/python/grpcio_csm_observability/grpc_csm_observability/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2024 gRPC authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# 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 = ["//:__subpackages__"]) | ||
|
||
# Since packages in requirement() are non-hermetic, | ||
# csm_observability is for internal use only. | ||
py_library( | ||
name = "csm_observability", | ||
srcs = glob(["*.py"]), | ||
imports = [ | ||
".", | ||
"../", | ||
], | ||
srcs_version = "PY3ONLY", | ||
deps = [ | ||
requirement("opentelemetry-resourcedetector-gcp"), | ||
requirement("opentelemetry-sdk"), | ||
"//src/python/grpcio/grpc:grpcio", | ||
"//src/python/grpcio_observability/grpc_observability:pyobservability", | ||
"@com_google_protobuf//:protobuf_python", | ||
], | ||
) |
18 changes: 18 additions & 0 deletions
18
src/python/grpcio_csm_observability/grpc_csm_observability/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2024 gRPC authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# 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. | ||
from grpc_csm_observability._csm_observability_plugin import ( | ||
CsmOpenTelemetryPlugin, | ||
) | ||
|
||
__all__ = ("CsmOpenTelemetryPlugin",) |
Oops, something went wrong.