TracingConfig#
- pydantic model ray.serve.schema.TracingConfig[source]#
Tracing config schema for configuring distributed tracing on Serve components.
Example
from ray import serve from ray.serve.schema import TracingConfig # Enable tracing with default exporter serve.start(tracing_config=TracingConfig(enabled=True))
PublicAPI (alpha): This API is in alpha and may change before becoming stable.
- field enabled: bool [Optional]#
Whether tracing is enabled. Defaults to True when the RAY_SERVE_TRACING_EXPORTER_IMPORT_PATH environment variable is set. When enabled, spans will be exported using the configured exporter.
- field exporter_import_path: str [Optional]#
Import path to a custom tracing exporter function. Defaults to the RAY_SERVE_TRACING_EXPORTER_IMPORT_PATH environment variable. If empty and tracing is enabled, the default file-based exporter is used.
- field sampling_ratio: float [Optional]#
Sampling ratio for traces (0.0 to 1.0). Defaults to the RAY_SERVE_TRACING_SAMPLING_RATIO environment variable (0.01, i.e. 1%).
- validator validate_sampling_ratio » sampling_ratio[source]#