OpenTelemetry Service#

The OpenTelemetry service provides comprehensive metrics, traces, and logs collection and analysis with 9 tools for managing observability resources.

Overview#

The OpenTelemetry service in Cloud Native MCP Server enables AI assistants to collect and analyze telemetry data from applications and infrastructure efficiently. It provides tools for metrics collection, trace analysis, and log aggregation.

Key Capabilities#

### πŸ“Š Metrics Collection Collect and analyze application and infrastructure metrics.
### πŸ“ Trace Analysis Distributed tracing with performance insights.
### πŸ“ Log Aggregation Unified log collection and analysis.
### πŸ› οΈ Configuration Manage OpenTelemetry collector configuration and status.

Available Tools (9)#

Metrics Management#

  • otel-get-metrics: Get metrics from OpenTelemetry collector
  • otel-get-metric-data: Get metric data
  • otel-list-metric-streams: List metric streams
  • otel-get-metrics-schema: Get metrics schema

Trace Management#

  • otel-get-traces: Get traces from OpenTelemetry collector
  • otel-search-traces: Search traces
  • otel-get-traces-schema: Get traces schema

Log and Configuration Management#

  • otel-get-logs: Get logs from OpenTelemetry collector
  • otel-get-logs-schema: Get logs schema

System Information#

  • otel-get-status: Get OpenTelemetry collector status
  • otel-get-config: Get OpenTelemetry collector configuration
  • otel-get-health: Get OpenTelemetry collector health
  • otel-get-versions: Get OpenTelemetry component versions

Quick Examples#

Get metrics from the collector#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "method": "tools/call",
  "params": {
    "name": "otel-get-metrics",
    "arguments": {
      "metric_name": "http_requests_total",
      "start_time": "1 hour ago",
      "end_time": "now"
    }
  }
}

Get traces for a specific service#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "method": "tools/call",
  "params": {
    "name": "otel-get-traces",
    "arguments": {
      "service_name": "my-app",
      "limit": 50
    }
  }
}

Get collector configuration#

1
2
3
4
5
6
7
{
  "method": "tools/call",
  "params": {
    "name": "otel-get-config",
    "arguments": {}
  }
}

Best Practices#

  • Implement proper resource attributes for effective filtering
  • Use appropriate sampling strategies for traces
  • Configure appropriate metric collection intervals
  • Monitor collector health and resource usage
  • Set up alerts based on telemetry data patterns

Next Steps#