Skip to content

Conversation

@adityamparikh
Copy link
Contributor

Summary

  • Add OpenTelemetry observability support using the official opentelemetry-spring-boot-starter
  • Integrate LGTM stack (Loki, Grafana, Tempo, Mimir) via Docker Compose for local development
  • Add @Observed annotation to service classes for distributed tracing
  • Configure Prometheus metrics endpoint for scraping

Changes

  • build.gradle.kts: Add OpenTelemetry instrumentation BOM and Spring Boot starter, Micrometer Prometheus registry
  • compose.yaml: Add LGTM service (grafana/otel-lgtm) for observability backend
  • application-http.properties: Add OTEL configuration with gRPC protocol on port 4317
  • logback-spring.xml: Add profile-specific logging (http/stdio/test profiles)
  • Service classes: Add @Observed annotation for automatic span creation

Observability Stack

Signal Protocol Destination
Traces OTLP/gRPC Tempo
Metrics Prometheus scrape Mimir
Logs OTLP Loki

Access Grafana at http://localhost:3000 after starting the application in HTTP mode.

Test plan

  • Start application with --spring.profiles.active=http
  • Verify Docker Compose starts LGTM container automatically
  • Access Grafana at http://localhost:3000
  • Execute MCP tool calls and verify traces appear in Tempo
  • Verify metrics are available at /actuator/prometheus
  • Check logs appear in Loki

🤖 Generated with Claude Code

…logging configuration, and enable tracing with annotation support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant