8 Tracing the Flow of API Calls

You can trace the flow of API calls made to Network Bridge through Jaeger in your Oracle Communications Network Bridge cloud native system.

Topics in this document:

About Tracing

You can trace the flow of messages through Network Bridge by using the Jaeger tracer tool integrated with the Helidon framework. You use this tool to understand any request failures and to troubleshoot performance issues in Network Bridge.

Helidon is a collection of Java libraries used by Network Bridge, and Jaeger is an open-source tracing system that is used with Helidon. For more information about Helidon and Jaeger, see:

In a Network Bridge cloud native deployment, you can trace these components:

  • Mediation component

  • Egress component

  • HTTP to Diameter Adapter component

  • Diameter to HTTP Adapter component

  • Diameter Proxy component

To set up tracing in Network Bridge cloud native:

  1. Install Jaeger Operator. See the Jaeger Operator for Kubernetes documentation: https://www.jaegertracing.io/docs/1.41/operator/.

  2. Enable Jaeger tracing in Network Bridge cloud native. See "Enabling Tracing in Network Bridge".

Afterward, you can use the Jaeger UI to start visualizing and analyzing the trace data.

Enabling Tracing in Network Bridge

By default, tracing is disabled in Network Bridge cloud native.

To enable tracing with Jaeger:

  1. Create an override-values.yaml file for oc-ccs-helm-chart-version.

  2. Enable tracing across all Network Bridge components by setting these keys:

    • tracingEnabled: Set this to true.

    • tracingHost: Set to this to the host name of the server on which tracing is running. For example: opentelemetry.telemetry.svc.cluster.local.

    • tracingPort: Set this to the trace server port.

  3. (Optional) Customize how Network Bridge samples messages. Set these keys under the tracing section of each Network Bridge component:

    • 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 sending a batch. The default is 10002 (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 none of the 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.

    • 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.

  4. Save and close your override-values.yaml file.

  5. Deploy or redeploy the Network Bridge Helm release by running the helm install command:

    helm install NbReleaseName oc-ccs-helm-chart-version –-values override-values.yaml -n NbNameSpace

    where:

    • NbReleaseName is the release name for the Network Bridge Helm chart and is used to track this installation instance.

    • NbNameSpace is the namespace in which to create Kubernetes objects for the Network Bridge Helm chart.

The following sample override-values.yaml file configures tracing for the Mediation component. It specifies to create a queue the size of 42 spans, to hold events in the queue for 10 seconds, to sample all traces, and to log spans.

tracing:
  service: mediation
  maxQueueSize: 42
  flushIntervalMs: 1000
  samplerType: const
  samplerParam: 1
  samplerManager:
  logSpans: true