Enabling Tracing for OpenTelemetry Collector

Before you begin Make sure that you meet the following requirements:

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>

You can also encrypt base64 encoded certificate value by using either TIBCO Cloud Integration platform API or by using app executable and set it to the environment variable with prefix "SECRET:"

For example:

  • FLOGO_OTEL_TLS_SERVER_CERT=SECRET:<encrypted_base64_encoded_cert_value>

For details about encryption, see Encryption using App executable or Encryption using TIBCO Cloud Platform API. .

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