coding-mcp provides three observability layers:
  • Structured logs (Pino)
  • Audit logs for mutating operations
  • OpenTelemetry trace hooks

Logging

Set LOG_LEVEL to control verbosity.
LOG_LEVEL=info

Audit log

Mutating operations are appended to the audit log file.
AUDIT_LOG_FILE=~/.coding-mcp/audit.log

OpenTelemetry

Enable OTLP export:
ENABLE_OTEL=true
OTEL_SERVICE_NAME=coding-mcp
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces
OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer%20token
Spans emitted:
SpanDescription
mcp.http.requestEmitted for every HTTP request received by the server
mcp.tool.{operation}Emitted for each tool execution, named after the operation

HTTP monitoring endpoints

When HTTP transport is enabled:
EndpointDescription
GET /healthzLiveness check — returns ok when the server is running
GET /readyzReadiness check — returns ok with the number of indexed projects
GET /metricsBasic metrics: request_count, error_count, and latency summary

Troubleshooting

If traces do not appear:
  1. Verify exporter endpoint reachability
  2. Verify OTLP headers format (key=value,key2=value2)
  3. Check server logs for initialization errors