Skip to main content

Configuration

This is the full list of global options and their environment variable alternatives. Any defaults left blank in the table are either False or None.

Option NameTypeEnvironDefaultOptions
enabledboolROTEL_ENABLED
pid_filestrROTEL_PID_FILE/tmp/rotel-agent.pid
log_filestrROTEL_LOG_FILE/tmp/rotel-agent.log
log_formatstrROTEL_LOG_FORMATtextjson, text
debug_loglist[str]ROTEL_DEBUG_LOGtraces, metrics, logs
otlp_grpc_endpointstrROTEL_OTLP_GRPC_ENDPOINTlocalhost:4317
otlp_http_endpointstrROTEL_OTLP_HTTP_ENDPOINTlocalhost:4318

For each exporter you would like to use, see the configuration options below. Exporters should be assigned to the exporters dict with a custom name.

OTLP Exporter

To construct an OTLP exporter, use the method Config.otlp_exporter() with the following options.

Option NameTypeDefaultOptions
endpointstr
protocolstrgrpcgrpc or http
headersdict[str, str]
compressionstrgzipgzip or none
request_timeoutstr5s
retry_initial_backoffstr5s
retry_max_backoffstr30s
retry_max_elapsed_timestr300s
batch_max_sizeint8192
batch_timeoutstr200ms
tls_cert_filestr
tls_key_filestr
tls_ca_filestr
tls_skip_verifybool

Datadog Exporter

Rotel provides an experimental Datadog exporter that supports traces at the moment. Construct a Datadog exporter with the method Config.datadog_exporter() using the following options.

Option NameTypeDefaultOptions
regionstrus1us1, us3, us5, eu, ap1
custom_endpointstr
api_keystr

Clickhouse Exporter

Rotel provides a Clickhouse exporter with support metrics, logs, and traces. Construct a Clickhouse exporter with the method Config.clickhouse_exporter() using the following options.

Option NameTypeDefaultOptions
endpointstr
databasestrotel
table_prefixstrotel
compressionstrlz4
async_insertbooltrue
userstr
passwordstr
enable_jsonbool
json_underscorebool

Kafka Exporter

Rotel provides a Kafka exporter with support for metrics, logs, and traces. Construct a Kafka exporter with the method Config.kafka_exporter() using the following options.

Option NameTypeDefaultOptions
brokerslistlocalhost:9092
traces_topicstrotlp_traces
logs_topicstrotlp_logs
metrics_topicstrotlp_metrics
formatstrprotobufjson, protobuf
compressionstrnonegzip, snappy, lz4, zstd, none
acksstroneall, one, none
client_idstrrotel
max_message_bytesint1000000
linger_msint5
retriesint2147483647
retry_backoff_msint100
retry_backoff_max_msint1000
message_timeout_msint300000
request_timeout_msint30000
batch_sizeint1000000
partitionerstrconsistent-randomconsistent, consistent-randomm, murmur2-random, murmur2, fnv1a, fnv1a-random
partitioner_metrics_by_resource_attributesstr1000
partitioner_logs_by_resource_attributesstr1000
custom_configstr1000
sasl_usernamestr
sasl_passwordstr
sasl_mechanismstrplain, scram-sha256, scram-sha512
security_protocolstrplaintextplaintext, ssl, sasl-plaintext, sasl-ssl

Blackhole Exporter

The blackhole exporter can be configured by using the method Config.blackhole_exporter(). It does not have any options.

Multiple exporters

Pyrotel supports multiple exporters, allowing you to send data to different destinations per telemetry type. Just set the exporters entry to a dict map of exporter definitions and then configure the exporters per telemetry type. For example, this will send metrics and logs to an OTLP endpoint while sending traces to Datadog:

from rotel import Config, Rotel

rotel = Rotel(
enabled = True,
exporters = {
'logs_and_metrics': Config.otlp_exporter(
endpoint = "https://foo.example.com",
headers = {
"x-api-key" : settings.API_KEY,
"x-data-set": "testing"
}
),
'tracing': Config.datadog_exporter(
api_key = "1234abcd",
),
},
# Define exporters per telemetry type
exporters_traces = ['tracing'],
exporters_metrics = ['logs_and_metrics'],
exporters_logs = ['logs_and_metrics']
)
rotel.start()

Processors

You can pass a list of Python files to Rotel that support the Python Processor SDK, by setting the following top-level config values. Each takes a list of absolute file paths to files implementing the processor SDK.

Option NameType
processors_metricslist[str]
processors_traceslist[str]
processors_logslist[str]

See the Python Processor SDK docs for more information.