Este contenido no está disponible en el idioma seleccionado.
Chapter 10. Integrating the OpenTelemetry SDK with APIcast
The integration of OpenTelemetry SDK with APIcast enables the export of telemetry data that provide insights into system performance and behavior. APIcast relies on the NGINX OpenTelemetry tracing library. This integration helps to identify and resolve performance issues, leading to improved system stability.
Prerequisites
Trace Collector supporting APIcast exporter traces.
-
The only implemented exporter in APIcast is OpenTelemetry Protocol (OTLP) over gRPC (Remote Procedure Calls)
OTLP/gRPC
. -
OTLP over HTTP (
OTLP/HTTP
) is not being used by APIcast. -
If the existing collector does not support APIcast
OTLP/gRPC
traces, an OpenTelemetry Collector is required as tracing proxy.
-
The only implemented exporter in APIcast is OpenTelemetry Protocol (OTLP) over gRPC (Remote Procedure Calls)
10.1. Jaeger service examples for deploying listening for OTP and gRPC traces Copiar enlaceEnlace copiado en el portapapeles!
Jaeger 1.35 or later supports the trace collector, which includes APIcast exporter functionality. As a result, Jaeger can now receive trace data from the OpenTelemetry SDKs in the native OpenTelemetry Protocol (OTLP) over gRPC (Remote Procedure Calls) OTLP/gRPC
.
The following examples are not suitable for production use.
Example for deploying Jaeger
oc apply -f - <<EOF
oc apply -f - <<EOF
A Jaeger service instance will be deployed listening for OTLP/gRPC
traces in port 4317 and in the 3scale Admin Portal on port 16686.
Tracing header example:
"Traceparent": "00-4335058ae8ec72f9636d8c0da08c62be-137a4beaae638572-01",
"Traceparent": "00-4335058ae8ec72f9636d8c0da08c62be-137a4beaae638572-01",
10.2. Configuring APIcast for tracing Copiar enlaceEnlace copiado en el portapapeles!
To ensure a scalable and reliable gateway infrastructure for 3scale APIs, you can manually configure APIcast for tracing. This will help ensure a reliable and scalable gateway infrastructure for your API services.
Procedure
Create a configuration file for APIcast instrumentation:
The configuration file specification is defined in the NGINX instrumentation library repo.
$ oc apply -f - <<EOF
$ oc apply -f - <<EOF
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Define an APIcast custom resource (CR) that specifies
openTelemetry
attributes. In the CR definition, set theopenTelemetry.tracingConfigSecretRef.name
attribute to the name of the secret that contains your openTelemetry configuration details. The following example shows only content relative to configuring openTelemetry:Copy to Clipboard Copied! Toggle word wrap Toggle overflow