-
Notifications
You must be signed in to change notification settings - Fork 614
[FEATURE]: Remove observability service dependency from plugin framework #2828
Copy link
Copy link
Closed
Copy link
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releaseenhancementNew feature or requestNew feature or requestplugins
Milestone
Description
Create a protocol-based abstraction for observability:
# plugins/framework/observability.py
from typing import Protocol, Optional
from contextvars import ContextVar
current_trace_id: ContextVar[Optional[str]] = ContextVar("current_trace_id", default=None)
class ObservabilityProvider(Protocol):
"""Interface for observability - host application implements this."""
def start_trace(self, name: str, **kwargs) -> Optional[str]: ...
def end_trace(self, trace_id: str, **kwargs) -> None: ...
class NullObservability:
"""Default no-op implementation for standalone operation."""
def start_trace(self, name: str, **kwargs) -> None:
return None
def end_trace(self, trace_id: str, **kwargs) -> None:
passTasks:
- Create
plugins/framework/observability.pywithObservabilityProviderprotocol - Implement
NullObservabilityas default - Refactor
PluginManagerto accept optionalobservabilityparameter - Remove
mcpgateway.db.SessionLocalimport
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releaseenhancementNew feature or requestNew feature or requestplugins