gRPC Python Observability

Module Contents

class grpc_observability.OpenTelemetryPlugin(*, plugin_options=[], meter_provider=None, target_attribute_filter=None, generic_method_attribute_filter=None)[source]

Describes a Plugin for OpenTelemetry observability.

Parameters:
  • plugin_options (Iterable[OpenTelemetryPluginOption]) –

  • meter_provider (MeterProvider | None) –

  • target_attribute_filter (Callable[[str], bool]) –

  • generic_method_attribute_filter (Callable[[str], bool]) –

deregister_global()[source]

De-register the global plugin that acts on all channels and servers running on the process.

Raises:

RuntimeError – If no global plugin was registered.

Return type:

None

register_global()[source]

Registers a global plugin that acts on all channels and servers running on the process.

Raises:

RuntimeError – If a global plugin was already registered.

Return type:

None