gRPC Python CSM observability package
Reason this release was yanked:
https://github.com/grpc/grpc/issues/37178
Project description
Package for gRPC Python CSM Observability.
Supported Python Versions
Python >= 3.8
Installation
Currently gRPC Python CSM Observability is only available for Linux.
Installing From PyPI
$ pip install grpcio-csm-observability
Installing From Source
$ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc $REPO_ROOT $ cd $REPO_ROOT $ git submodule update --init $ cd src/python/grpcio_csm_observability # For the next command do `sudo pip install` if you get permission-denied errors $ pip install .
Dependencies
gRPC Python CSM Observability Depends on the following packages:
grpcio grpcio-observability opentelemetry-sdk
Usage
Example usage is similar to the example here, instead of importing from grpc_observability, you should import from grpc_csm_observability:
import grpc_csm_observability
csm_otel_plugin = grpc_csm_observability.CsmOpenTelemetryPlugin(
meter_provider=provider
)
We also provide several environment variables to help you optimize gRPC python observability for your particular use.
Note: The term “Census” here is just for historical backwards compatibility reasons and does not imply any dependencies.
- GRPC_PYTHON_CENSUS_EXPORT_BATCH_INTERVAL
This controls how frequently telemetry data collected within gRPC Core is sent to Python layer.
Default value is 0.5 (Seconds).
- GRPC_PYTHON_CENSUS_MAX_EXPORT_BUFFER_SIZE
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.
- 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 telemetry data is sent to Python.
Default value is 0.7 (Which means buffer will start export when it’s 70% full).
- GRPC_PYTHON_CENSUS_EXPORT_THREAD_TIMEOUT
This controls the maximum time allowed for the exporting thread (responsible for sending data to Python) to complete.
Main thread will terminate the exporting thread after this timeout.
Default value is 10 (Seconds).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file grpcio_csm_observability-1.65.0.tar.gz
.
File metadata
- Download URL: grpcio_csm_observability-1.65.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb3a93575eb4853bd94a4447eb62cf9ca871b63bb0a81012550ba0adae3ed44 |
|
MD5 | d1d8427dc7255c6c51b8e4e3babd366c |
|
BLAKE2b-256 | 8e4152969f3bc988d11a4434975519f71ec2a0601686e3c81c508c83bc1e4972 |
File details
Details for the file grpcio_csm_observability-1.65.0-py3-none-any.whl
.
File metadata
- Download URL: grpcio_csm_observability-1.65.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd742053eb21cd65ee7a2b75120dd0019cafc8f1c886d878c9358501c077afce |
|
MD5 | 2983430c873deea72377f754d751c7cc |
|
BLAKE2b-256 | 3b2adeef7dce7a3825b5ef87241bf2e557c3cfa3ece9cc7f66bd529526953fe1 |