Integrates OpenTelemetry for distributed tracing#6
Merged
async-human merged 3 commits intomainfrom Feb 4, 2026
Merged
Conversation
Enables distributed tracing across all microservices (Assembly, IAM, Inventory, Notification, Order, Payment) using OpenTelemetry. Introduces an OpenTelemetry Collector and Jaeger as a tracing backend in the deployment. Configures each service to initialize an OpenTelemetry tracer, exporting spans via gRPC to the collector. Adds gRPC unary server and client interceptors for automatic context propagation and span creation for inter-service communication. Enhances key business logic methods with manual span creation to capture operation details and record errors, improving observability and debugging capabilities.
Integrates a comprehensive monitoring solution using OpenTelemetry metrics,
Prometheus, and Grafana across all microservices.
* Introduces a new `platform/pkg/metrics` module for standard OpenTelemetry
metric provider initialization, exporting via OTLP/gRPC.
* Standardizes environment variable configuration (`COLLECTOR_ENDPOINT`,
`COLLECTOR_INTERVAL`) for metric collection across all services.
* Defines service-specific metric instruments within a new `internal/metrics`
package in each microservice.
* Adds automatic gRPC interceptors and HTTP middleware to record common
request metrics (total requests, active connections, request duration)
with method, path, and status attributes.
* Integrates business-specific metrics into key service operations (e.g.,
user registrations/logins, order creation/payment, ship assembly,
part retrieval, notification sending).
* Deploys Prometheus and Grafana via Docker Compose, including:
* Prometheus configured with remote write to receive metrics from OTel Collector.
* Grafana provisioned with Prometheus datasource and a central
'Microservices Monitoring Dashboard' JSON definition.
* Updates the OpenTelemetry Collector configuration to include a metrics
pipeline that exports received OTLP metrics to Prometheus.
* Upgrades OpenTelemetry and other Go dependencies across all services.
Refactor the logging system to utilize OpenTelemetry (OTel) for centralized log collection and export to an Elasticsearch/Kibana stack. Key changes include: - Extend `LoggerConfig` interface and its implementations across services to support OTel-specific configurations (service name, environment, collector endpoint). - Introduce a `SimpleOpenTelemetryCore` for Zap, bridging structured logs to OTel `log.Record`s for richer telemetry. - Update Docker Compose to provision Elasticsearch, Kibana, and an initializer service for Kibana to set up a default logs data view. - Configure the OpenTelemetry collector with an Elasticsearch exporter and a new pipeline to forward OTLP logs, enriching them with environment attributes. - Simplify tracing shutdown registration in application initialization across all services. This significantly enhances observability by enabling structured logs to be exported and visualized in a centralized logging system.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables distributed tracing across all microservices (Assembly, IAM, Inventory, Notification, Order, Payment) using OpenTelemetry.
Introduces an OpenTelemetry Collector and Jaeger as a tracing backend in the deployment. Configures each service to initialize an OpenTelemetry tracer, exporting spans via gRPC to the collector.
Adds gRPC unary server and client interceptors for automatic context propagation and span creation for inter-service communication. Enhances key business logic methods with manual span creation to capture operation details and record errors, improving observability and debugging capabilities.