Configuring SBA Gateway Tracing with OpenTelemetry
Distributed tracing is supported for SBA Gateway using OpenTelemetry. By enabling OpenTelemetry, you can capture detailed telemetry data to monitor and improve the performance.
The following example is a configuration for integrating OpenTelemetry with SBA Gateway. The example shows how to enable tracing, set the tracing policy, and configure the OpenTelemetry endpoint and sampling strategy:
sba-5gc-chf:
configuration:
container:
configmap:
nf.yaml: |-
gateway:
# Distributed Tracing settings
tracing:
openTelemetry:
enabled: true
# The tracing policy. Can be IGNORE, PROPAGATE or ALWAYS.
# See https://vertx.io/docs/apidocs/io/vertx/core/tracing/TracingPolicy.html
policy: ALWAYS
# The url of an endpoint that can accept OpenTelemetry tracing
# (that is, An OpenTelemetry Collector)
endpointUrl:
http://otel-collector-opentelemetry-collector.open-telemetry.svc.cluster.local:4317
serviceName: chf
traces:
ratio: 0.5
# Accepted values for sampler: 'ALWAYS_ON', 'ALWAYS_OFF',
# 'PARENTBASED_ALWAYS_ON', 'PARENTBASED_ALWAYS_OFF',
# 'PARENTBASED_TRACEIDRATIO', 'TRACEIDRATIO'
sampler: PARENTBASED_ALWAYS_ON
# Value of ratio needs to be set if sampler is
# 'PARENTBASED_TRACEIDRATIO' or 'TRACEIDRATIO'
ratio: 0.1
# Subscribers to trace
subscribers: []
# Headers to propagate
propagateHeaders: [x-request-id]