diff --git a/chromadb/telemetry/opentelemetry/__init__.py b/chromadb/telemetry/opentelemetry/__init__.py index 7c44809321f..0160c28183d 100644 --- a/chromadb/telemetry/opentelemetry/__init__.py +++ b/chromadb/telemetry/opentelemetry/__init__.py @@ -1,9 +1,8 @@ from functools import wraps from enum import Enum -from typing import Any, Callable, Dict, Optional, Sequence, Union, cast +from typing import Any, Callable, Dict, Optional, Sequence, Union from opentelemetry import trace -from opentelemetry.util import types from opentelemetry.sdk.resources import SERVICE_NAME, Resource from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import ( @@ -62,13 +61,6 @@ def __init__(self, system: System): granularity: OpenTelemetryGranularity = OpenTelemetryGranularity("none") -def _transform_attributes( - attributes: Dict[str, Any] -) -> Dict[str, types.AttributeValue]: - """Transform attributes to the format expected by OpenTelemetry.""" - return {k: cast(types.AttributeValue, v) for k, v in attributes.items()} - - def otel_init( otel_service_name: Optional[str], otel_collection_endpoint: Optional[str],