Fix OTEL
This commit is contained in:
@@ -157,6 +157,30 @@ class OTelConfig:
|
||||
|
||||
return endpoint
|
||||
|
||||
@classmethod
|
||||
def _clean_and_validate_grpc_endpoint(cls, endpoint: str) -> str:
|
||||
"""
|
||||
Clean and validate a gRPC endpoint.
|
||||
|
||||
Args:
|
||||
endpoint: Raw endpoint string
|
||||
|
||||
Returns:
|
||||
Cleaned and validated endpoint in format "host:port"
|
||||
"""
|
||||
# First clean the endpoint
|
||||
cleaned = cls._clean_grpc_endpoint(endpoint)
|
||||
|
||||
# Validate it doesn't contain secret references
|
||||
if cls._contains_secret_reference(cleaned):
|
||||
logger.warning(
|
||||
"Endpoint contains secret reference, using default",
|
||||
original=endpoint
|
||||
)
|
||||
return f"{cls.DEFAULT_OTEL_COLLECTOR_HOST}:{cls.DEFAULT_GRPC_PORT}"
|
||||
|
||||
return cleaned
|
||||
|
||||
@staticmethod
|
||||
def _extract_host(endpoint: str) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user