OpenTelemetry Exporter (om_otel)
This module establishes HTTP(S) and GRPC connections to an OpenTelemetry collector or backend using the OpenTelemetry Protocol (OTLP) Specification. It supports traces and logs.
OpenTelemetry, or OTel, is an open-source observability framework that provides APIs and other tools for collecting and exporting telemetry data, such as traces, metrics, and logs. OTel is vendor-agnostic, and many observability platforms, libraries, services, and applications integrate it. It supports HTTP/1.1 and HTTP/2 connections.
To examine the supported platforms, see the list of installer packages in the Available Modules chapter. |
Configuration
The om_otel module accepts the following directives in addition to the common module directives.
Optional directives
Specifies the format used to send the events.
The possible values are |
|
This optional directive can be specified multiple times to add custom headers to each HTTP request. |
|
This optional directive can be used to enable HTTP compression for outgoing HTTP messages.
The possible values are |
|
HTTP basic authorization username.
You must also set the HTTPBasicAuthPassword directive to use HTTP authorization.
This directive is not supported together with the |
|
HTTP basic authorization password.
You must also set the HTTPBasicAuthUser directive to use HTTP authorization.
This directive is not supported together with the |
|
This boolean directive specifies whether the connection should be allowed with an expired certificate.
If set to |
|
This boolean directive specifies that the connection should be allowed without certificate verification.
If set to |
|
This directive specifies a path to a directory containing certificate authority (CA) certificates. These certificates will be used to verify the certificate presented by the remote host. The certificate files must be named using the OpenSSL hashed format, i.e. the hash of the certificate followed by .0, .1 etc. To find the hash of a certificate using OpenSSL:
For example, if the certificate hash is A remote host’s self-signed certificate (which is not signed by a CA) can also be trusted by including a copy of the certificate in this directory. The default operating system root certificate store will be used if this directive is not specified.
Unix-like operating systems commonly store root certificates in This directive is not supported together with the |
|
This specifies the path of the certificate authority (CA) certificate that will be used to verify the certificate presented by the remote host. A remote host’s self-signed certificate (which is not signed by a CA) can be trusted by specifying the remote host certificate itself. In the case of certificates signed by an intermediate CA, the certificate specified must contain the complete certificate chain (certificate bundle). |
|
This specifies the path of the certificate file that will be presented to the remote host during the HTTPS handshake. |
|
This specifies the path of the private key file that was used to generate the certificate specified by the HTTPSCertFile directive. This is used for the HTTPS handshake. |
|
This optional directive is used to specify the protocol, IP address (or hostname) and port number of the HTTP or SOCKS proxy server to be used.
The format is |
|
This optional directive sets the reconnect interval in seconds. If it is set, the module attempts to reconnect in every defined second. If it is not set, the reconnect interval will start at 1 second and doubles on every attempt. If the duration of the successful connection is greater than the current reconnect interval, then the reconnect interval will be reset to 1 sec. |
Output log format
om_otel forwards structured log records according to the directive Format.
Each log record includes the same fields as the ones supported by im_otel, except that $raw_event
, $RecordType
, and $Severity
are not included.
Besides this, om_otel automatically defines the values of the following fields if they are empty:
Log record type | Empty field | Replacement value |
---|---|---|
Logs |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Traces |
|
|
|
Random generated ID |
|
|
Random generated ID |
|
|
|
|
|
|