10 Tracing the Flow of API Calls
You can trace the flow of API calls made to the Oracle Communications Elastic Charging Engine (ECE) composable services through Jaeger.
Topics in this document:
About Tracing in the ECE Composable Services
You can trace the flow of messages through the ECE composable services by using the Jaeger tracing tool integrated with the Helidon framework. You use this tool to understand request failures and troubleshoot performance issues in the ECE composable services.
Helidon is a collection of Java libraries used by the ECE composable services, and Jaeger is an open-source tracing system that is used with Helidon. For more information about Helidon and Jaeger, see:
-
"MP - Jaeger Tracing" in the Helidon documentation
-
"Introduction" in the Jaeger documentation
You can trace these ECE composable service pods:
-
charging-gateway
-
nchf-converged-charging
To set up tracing in the ECE composable services:
-
Install the Jaeger Operator. See the Jaeger Operator for Kubernetes documentation: https://www.jaegertracing.io/docs/1.41/operator/.
-
Enable Jaeger tracing in the ECE composable services. See "Enabling Tracing in the ECE Composable Services".
Afterward, you can use the Jaeger UI to start visualizing and analyzing the trace data.
Enabling Tracing in the ECE Composable Services
By default, tracing is disabled in the ECE composable services.
To enable tracing with Jaeger:
-
Create an override-values.yaml file for oc-ccs-version.
-
Enable tracing across all ECE composable services by setting these keys:
-
tracingEnabled: Set this to true. The default is false.
-
tracingHost: Set this to the host name of the server on which tracing is running. For example: opentelemetry.telemetry.svc.cluster.local. The default is otlp-collector-host.
-
tracingPort: Set this to the trace server port. The default is 14250.
-
-
(Optional) Customize how the ECE composable services sample messages. Set these keys under the tracing section of each ECE composable service:
-
service: Set this to the name of the service.
-
maxQueueSize: Set this to the maximum queue size for Jaeger reporters. The default is 42 spans.
-
flushIntervalMs: Specify the amount of time, in milliseconds, that events are held in the queue before Jaeger sends a batch. The default is 10001 (about 10 seconds).
-
samplerType: Specify the sampling strategy to use: const or ratio. The default is ratio.
-
const: The sampler performs the same action, defined in the samplerParam key, on all traces.
Set the samplerParam key to 1 to sample all traces or to 0 to sample no traces.
-
ratio: The sampler ensures that a specified percentage of traces are sampled.
Set the samplerParam key to the percentage of traces to sample. For example, 0.5 specifies to sample 50% of all traces, and 1.0 specifies to sample all traces.
-
-
samplerManager: Specify the implementation used to control distributed tracing sampling behavior. A sampler manager can dynamically determine which traces are sampled, how sampling decisions are applied, and whether sampling policies can be updated at runtime.
-
logSpans: Specify whether to log spans for diagnostic purposes. A span is a logical unit of work that has an operation name, a start time, and a duration. The default is true.
-
-
Save and close your override-values.yaml file.
-
Deploy or redeploy the Helm release by running the helm install command:
helm install EceCompServicesReleaseName oc-ccs-version --values override-values.yaml -n EceCompServicesNameSpace
where:
-
EceCompServicesReleaseName is the release name for the Helm chart. Helm uses this name to track the installation instance.
-
EceCompServicesNameSpace is the namespace in which to create Kubernetes objects for the Helm chart.
-
The following sample override-values.yaml file configures tracing for an ECE composable service. It specifies creating a queue of 42 spans, holding events in the queue for 10 seconds, sampling all traces, and logging spans.
tracing:
service: mediation
maxQueueSize: 42
flushIntervalMs: 10001
samplerType: const
samplerParam: 1
samplerManager:
logSpans: true