OpenTelemetry is a collection of APIs and SDKs for generating, collecting, and exporting metrics, traces, and logs. In a microservice system, it provides visibility into requests that cross service boundaries. The Go implementation can instrument a gRPC application and send telemetry to a collector for inspection. section 9.2 section 9.0
Choose instrumentation points along the request path:
- Instrument gRPC client connections and server calls to observe communication between services. section 9.2.1
- Instrument database operations when they matter to the request; an OpenTelemetry GORM extension is available for that purpose. section 9.2.1
- Configure trace propagation so downstream services receive the existing trace context rather than appearing as isolated requests. section 9.2.1 section 9.3.5
For a Go gRPC server, configure a tracing provider at service startup, then attach an OpenTelemetry server interceptor. The provider uses a Jaeger exporter pointed at the collector endpoint and batches exports. Resource attributes identify the service and environment; those attributes can be searched in Jaeger. Set a text-map propagator to carry trace context across calls. section 9.3.5 section 9.3.4
import (
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
)
...
grpcServer := grpc.NewServer(
grpc.UnaryInterceptor(otelgrpc.UnaryServerInterceptor()),
)
...
The Order service attaches otelgrpc.UnaryServerInterceptor() when constructing its gRPC server, making server-side calls an instrumentation point. section 9.3.5
Follow an order across services
When the Order service calls the Payment service to charge a customer, propagated trace metadata lets the Jaeger UI display the wider request flow. Jaeger also provides service-latency views and trace queries by service name; its performance monitoring uses time-series data in Prometheus. section 9.3.5 section 9.2.4






