feat(tracing): add OpenTelemetry instrumentation to API gateway
- Add internal/tracing package with OTel tracer initialization - HTTP middleware for server-side tracing (request/response attributes) - Transport wrapper for client-side upstream call tracing - Update proxy to use tracing transport - Add OTEL_* env vars to k8s deployment Traces flow: api-gateway -> otel-collector -> tempo -> grafana
This commit is contained in:
@@ -61,6 +61,15 @@ spec:
|
||||
value: "5m"
|
||||
- name: LOG_LEVEL
|
||||
value: "info"
|
||||
# OpenTelemetry tracing configuration
|
||||
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||
value: "otel-collector.tracing.svc.cluster.local:4317"
|
||||
- name: OTEL_SERVICE_NAME
|
||||
value: "api-gateway"
|
||||
- name: OTEL_SERVICE_VERSION
|
||||
value: "1.0.0"
|
||||
- name: OTEL_ENVIRONMENT
|
||||
value: "production"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/gateway
|
||||
|
||||
Reference in New Issue
Block a user