Enabling Tracing for OpenTelemetry Collector

Before you begin Make sure that you meet the following requirements:
  • Ensure that you can connect to the OpenTelemetry Collector.
    Note: 
    • To use this feature for TIBCO Cloud Integration deployments, ensure that the OpenTelemetry Collector is reachable from app containers.
    • If the connection to OpenTelemetry Collector is lost, traces during that time duration are not collected.

  • Install an observability vendor tool of your choice: Jaeger, Zipkin, Datadog, and so on.

Mandatory Configuration Parameters

To enable tracing by using OpenTelemetry Collector, set the following mandatory parameters: 

Name Default Description
FLOGO_OTEL_TRACE False Enables tracing by using OpenTelemetry Collector.
FLOGO_OTEL_OTLP_ENDPOINT None

Specifies the OpenTelemetry protocol (OTLP) receiver endpoint for OpenTelemetry Collector.

Supported protocols are:

  • gRPC: Set to <host>:<otlp_grpc_port>.
  • HTTP: Set to https://<host>:<otlp_http_port>.

Optional Configuration Parameters

You can also use some optional configuration parameters when tracing apps using OpenTelemetry Collector. Here are some commonly used parameters and their descriptions: 

Name Default Description
FLOGO_OTEL_TRACE_ATTRIBUTES None

Add one or more custom attributes to the trace. The format is key-value pairs separated by commas. For example, to filter based on the deployment type and deployment cluster, you can use:

FLOGO_OTEL_TRACE_ATTRIBUTES="deployment.type=staging,deployment.cluster=staging3"

FLOGO_OTEL_OTLP_HEADERS None

Set one or more custom gRPC or HTTP headers in the request to the OpenTelemetry Collector. The format is key-value pairs separated by commas. For example: 

FLOGO_OTEL_OTLP_HEADERS="Authorization=Bearer <token>,API_KEY=<api_key_value>"

FLOGO_OTEL_TLS_SERVER_CERT None

If TLS is enabled for OpenTelemetry protocol receiver, set PEM-encoded server or CA. You can configure a path to the certificate or use base64-encoded certificate value. A file path must be prefixed with "file://".

For example: 

  • FLOGO_OTEL_TLS_SERVER_CERT="file:///Users/opentelemetry/certs/cert.pem"
  • FLOGO_OTEL_TLS_SERVER_CERT=<base64_encoded_server_certificate>

When this certificate is not set, an unsecure connection is established with OpenTelemetry Collector.