diff --git a/src/karapace/config.py b/src/karapace/config.py index 0dd811d92..710e94251 100644 --- a/src/karapace/config.py +++ b/src/karapace/config.py @@ -27,13 +27,22 @@ class KarapaceTags(BaseModel): app: str = "Karapace" +OTEL_VERSION = "" +try: + from opentelemetry import version as otel_version + + OTEL_VERSION = otel_version.__version__ +except: + pass + + class KarapaceTelemetry(BaseModel): otel_endpoint_url: str | None = None resource_service_name: str = "karapace" resource_service_instance_id: str = "karapace" resource_telemetry_sdk_name: str = "opentelemetry" resource_telemetry_sdk_language: str = "python" - resource_telemetry_sdk_version: str = "1.27.0" + resource_telemetry_sdk_version: str = OTEL_VERSION class Config(BaseSettings):