MCPcopy
hub / github.com/redis/redis-py / _get_config

Function _get_config

redis/observability/recorder.py:852–865  ·  view source on GitHub ↗

Get the OTel configuration from the observability manager. Returns: OTelConfig instance if observability is enabled, None otherwise

()

Source from the content-addressed store, hash-verified

850
851
852def _get_config() -> Optional["OTelConfig"]:
853 """
854 Get the OTel configuration from the observability manager.
855
856 Returns:
857 OTelConfig instance if observability is enabled, None otherwise
858 """
859 try:
860 manager = get_observability_instance().get_provider_manager()
861 if manager is None:
862 return None
863 return manager.config
864 except Exception:
865 return None
866
867
868def reset_collector() -> None:

Callers 3

record_pubsub_messageFunction · 0.70
record_streaming_lagFunction · 0.70

Calls 2

get_provider_managerMethod · 0.80

Tested by

no test coverage detected