OTLP Log Receivers
Overview
Section titled “Overview”Glouton can receive logs from external applications using the OpenTelemetry Protocol (OTLP) over both gRPC and HTTP. This allows applications instrumented with OpenTelemetry SDKs to send their logs directly to Glouton for processing and export to the Bleemeo Cloud Platform.
Select Logs Pushed Over the Network
Section titled “Select Logs Pushed Over the Network”You can declare a listener under the top-level opentelemetry.listeners, then reference it by name from one or more receivers with from_listeners:
opentelemetry: listeners: otlp: protocols: grpc: endpoint: "localhost:4317" http: endpoint: "localhost:4318"
log: opentelemetry: receivers: logs_from_otlp: from_listeners: [otlp]You can also declare a network listener without endpoints to use the default OpenTelemetry endpoints (localhost:4317 for grpc protocol, localhost:4318 http protocol):
opentelemetry: listeners: otlp: protocols: grpc: http:Environment Variables
Section titled “Environment Variables”Because listener names are arbitrary, there’s no fixed environment variable for opentelemetry.listeners.<name>. Instead, each listener’s gRPC and HTTP endpoints can be set individually through an environment variable that embeds the listener name:
| Setting | Environment Variable |
|---|---|
opentelemetry.listeners.<name>.protocols.grpc.endpoint |
GLOUTON_OPENTELEMETRY_LISTENERS_<name>_PROTOCOLS_GRPC_ENDPOINT |
opentelemetry.listeners.<name>.protocols.http.endpoint |
GLOUTON_OPENTELEMETRY_LISTENERS_<name>_PROTOCOLS_HTTP_ENDPOINT |
GLOUTON_OPENTELEMETRY_LISTENERS_otlp_PROTOCOLS_GRPC_ENDPOINT=localhost:4317<name> is recovered by trimming the fixed prefix and suffix from the variable name, so it can itself contain underscores (e.g. my_app). It is always lowercased, regardless of the case used in the environment variable.
- If
<name>matches a listener already declared in a config file, only the targeted endpoint is overwritten — the listener’s other protocol, and every other listener, are left untouched. - If
<name>doesn’t match any declared listener, a new one is created from the environment variable alone. Only the protocol you set is enabled; the other stays disabled, same as if it were omitted in YAML. - A variable that starts with
GLOUTON_OPENTELEMETRY_LISTENERS_but doesn’t end in_PROTOCOLS_GRPC_ENDPOINTor_PROTOCOLS_HTTP_ENDPOINT(for example a typo) is silently ignored, like any other unrecognizedGLOUTON_variable.
Filtering OTLP Logs
Section titled “Filtering OTLP Logs”Logs received via gRPC and HTTP can be filtered using global filters.
For example, to only keep logs with severity INFO or above:
log.opentelemetry.global_filters: include: match_type: strict severity_number: min: INFO match_undefined: true