We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DasBluEyedDevil/Daemon-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
tracing.py•1.01 KiB
"""
OpenTelemetry tracing integration for Daem0n-MCP.
FastMCP 3.0 has native OpenTelemetry support. This module provides
configuration and helper utilities for Daem0n-specific tracing.
Enable by setting:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=daem0nmcp
"""
import os
import logging
from typing import Optional
logger = logging.getLogger(__name__)
_TRACING_ENABLED: Optional[bool] = None
def is_tracing_enabled() -> bool:
"""Check if tracing is configured."""
global _TRACING_ENABLED
if _TRACING_ENABLED is not None:
return _TRACING_ENABLED
# Check for OTLP endpoint configuration
endpoint = os.environ.get("OTEL_EXPORTER_OTLP_ENDPOINT")
_TRACING_ENABLED = endpoint is not None and len(endpoint) > 0
if _TRACING_ENABLED:
logger.info(f"OpenTelemetry tracing enabled: {endpoint}")
return _TRACING_ENABLED
def get_service_name() -> str:
"""Get the service name for tracing."""
return os.environ.get("OTEL_SERVICE_NAME", "daem0nmcp")