Skip to main content

resq_mcp.telemetry

Telemetry setup for the ResQ MCP server. Provides initialization hooks for OpenTelemetry tracing and metrics. Currently operates in no-op mode with structured logging as a fallback. Future integration path:
  1. Install: opentelemetry-api, opentelemetry-sdk, opentelemetry-exporter-otlp
  2. Configure TracerProvider with appropriate exporters
  3. Configure MeterProvider for Prometheus metrics
  4. Add trace decorators to key operations

annotations

logging

TYPE_CHECKING

settings

logger

setup_telemetry

def setup_telemetry() -> None
Initialize OpenTelemetry tracing and metrics. Currently operates in no-op mode. When DEBUG is enabled, logs the initialization for visibility.

trace

def trace(name: str | None = None) -> Callable[[F], F]
Decorator stub for tracing function execution. Arguments:
  • name - Optional span name. Defaults to the function name.
Returns: A no-op decorator that returns the original function. Example: @trace(“custom.operation.name”) def my_function(): …