From 4991dfee83303daa6ce00dbbf6b3ae97ddaf177e Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Fri, 19 Jan 2024 19:18:52 +0000 Subject: [PATCH] Changes based on comment --- doc/python/sphinx/grpc_observability.rst | 7 +++++++ src/python/grpcio_observability/README.rst | 14 +++++++------- tools/run_tests/artifacts/artifact_targets.py | 2 +- tools/run_tests/artifacts/build_artifact_python.sh | 4 ++-- 4 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 doc/python/sphinx/grpc_observability.rst diff --git a/doc/python/sphinx/grpc_observability.rst b/doc/python/sphinx/grpc_observability.rst new file mode 100644 index 0000000000000..c0316f5d4f7fc --- /dev/null +++ b/doc/python/sphinx/grpc_observability.rst @@ -0,0 +1,7 @@ +gRPC Python Observability +==================== + +Module Contents +--------------- + +.. automodule:: grpc_observability diff --git a/src/python/grpcio_observability/README.rst b/src/python/grpcio_observability/README.rst index 25738c1f141fa..a597057198f52 100644 --- a/src/python/grpcio_observability/README.rst +++ b/src/python/grpcio_observability/README.rst @@ -7,9 +7,9 @@ More details can be found in `OpenTelemetry Metrics gRFC = 3.7 Installation ------------ -Currently gRPC Python Observability is :code:`only available for Linux`. +Currently gRPC Python Observability is **only available for Linux**. Installing From PyPI ~~~~~~~~~~~~~~~~~~~~ @@ -71,18 +71,18 @@ Usage You can find example usage in `Python example folder `_. -We also provides couple of environment variables to help you optimize gRPC python observability for your particular use. +We also provide several environment variables to help you optimize gRPC python observability for your particular use. 1. GRPC_PYTHON_CENSUS_EXPORT_BATCH_INTERVAL - * This controls how frequently census data collected within gRPC Core is sent to Python layer. + * This controls how frequently telemetry data collected within gRPC Core is sent to Python layer. * Default value is 0.5 (Seconds). 2. GRPC_PYTHON_CENSUS_MAX_EXPORT_BUFFER_SIZE - * This controls the maximum number of census data items that can be held in the buffer within gRPC Core before they are sent to Python. + * This controls the maximum number of telemetry data items that can be held in the buffer within gRPC Core before they are sent to Python. * Default value is 10,000. 3. GRPC_PYTHON_CENSUS_EXPORT_THRESHOLD - * This setting acts as a trigger: When the buffer in gRPC Core reaches a certain percentage of its capacity, the census data is sent to Python. + * This setting acts as a trigger: When the buffer in gRPC Core reaches a certain percentage of its capacity, the telemetry data is sent to Python. * Default value is 0.7 (Which means buffer will start export when it's 70% full). 4. GRPC_PYTHON_CENSUS_EXPORT_THREAD_TIMEOUT diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index e32acb2a700a6..5368a6e3ca010 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -142,7 +142,7 @@ def build_jobspec(self, inner_jobs=None): if self.platform == "macos": environ["ARCHFLAGS"] = "-arch arm64 -arch x86_64" - environ["GRPC_UNIVERSAL2_REPAIR"] = "true" + environ["GRPC_BUILD_MAC"] = "true" if self.platform == "linux_extra": # Crosscompilation build for armv7 (e.g. Raspberry Pi) diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index e719fa226d342..6e02c4f7fd9f4 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -185,7 +185,7 @@ fix_faulty_universal2_wheel() { # This is necessary due to https://github.com/pypa/wheel/issues/406. # wheel incorrectly generates a universal2 artifact that only contains # x86_64 libraries. -if [ "$GRPC_UNIVERSAL2_REPAIR" != "" ]; then +if [ "$GRPC_BUILD_MAC" != "" ]; then for WHEEL in dist/*.whl tools/distrib/python/grpcio_tools/dist/*.whl; do fix_faulty_universal2_wheel "$WHEEL" done @@ -284,7 +284,7 @@ then # Build grpcio_observability source distribution # Skips MacOS since grpcio_observability does not support MacOS. - if [ "$GRPC_UNIVERSAL2_REPAIR" == "" ]; then + if [ "$GRPC_BUILD_MAC" == "" ]; then "${PYTHON}" src/python/grpcio_observability/make_grpcio_observability.py ${SETARCH_CMD} "${PYTHON}" src/python/grpcio_observability/setup.py \ sdist bdist_wheel