feat(metrics): Introducing OpenTelemetry gRPC metrics
What?
This merge request adds OpenTelemetry-based metrics collection for gRPC services to the project. The changes introduce new functionality that allows developers to monitor and measure the performance of both gRPC clients (applications making requests) and servers (applications handling requests) without relying on global configuration.
The main additions include:
- New factory functions that create metrics collectors for gRPC clients and servers
- Configuration options to customize which metrics are collected and how they're labeled
- Integration with the OpenTelemetry standard for observability
- Comprehensive documentation and examples showing how to use the new features
Why?
Part of: gitlab-com/gl-infra/tenant-scale/cells-infrastructure/team#54
How to set up and validate locally
- Checkout the branch
vg/otel_grpc_metricsof topology-service - Run topology service locally
./env.sh null go run ./cmd/topology-service serve
- Fire a couple of gRPC requests using
grpcurl
grpcurl --plaintext \
:9097 \
grpc.health.v1.Health/Check
{
"status": "SERVING"
}
- Check the metrics endpoint
curl http://localhost:9098/metrics