diff --git a/api/core/ops/base_trace_instance.py b/api/core/ops/base_trace_instance.py index 04b46d67a8..8c081ae225 100644 --- a/api/core/ops/base_trace_instance.py +++ b/api/core/ops/base_trace_instance.py @@ -14,10 +14,9 @@ class BaseTraceInstance(ABC): Base trace instance for ops trace services """ - @abstractmethod def __init__(self, trace_config: BaseTracingConfig): """ - Abstract initializer for the trace instance. + Initializer for the trace instance. Distribute trace tasks by matching entities """ self.trace_config = trace_config diff --git a/api/core/ops/ops_trace_manager.py b/api/core/ops/ops_trace_manager.py index 549e428f88..177991e645 100644 --- a/api/core/ops/ops_trace_manager.py +++ b/api/core/ops/ops_trace_manager.py @@ -41,8 +41,8 @@ logger = logging.getLogger(__name__) class OpsTraceProviderConfigMap(collections.UserDict[str, dict[str, Any]]): - def __getitem__(self, provider: str) -> dict[str, Any]: - match provider: + def __getitem__(self, key: str) -> dict[str, Any]: + match key: case TracingProviderEnum.LANGFUSE: from core.ops.entities.config_entity import LangfuseConfig from core.ops.langfuse_trace.langfuse_trace import LangFuseDataTrace @@ -149,7 +149,7 @@ class OpsTraceProviderConfigMap(collections.UserDict[str, dict[str, Any]]): } case _: - raise KeyError(f"Unsupported tracing provider: {provider}") + raise KeyError(f"Unsupported tracing provider: {key}") provider_config_map = OpsTraceProviderConfigMap()