> ## Documentation Index
> Fetch the complete documentation index at: https://otel.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Logzio

> OpenTelemetry exporter for Logzio

# Logzio Exporter

![Status](https://img.shields.io/badge/status-beta-yellow)

**Available in:** `contrib`

**Maintainers:** [@yotamloe](https://github.com/yotamloe)

**Source:** [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/logzioexporter)

## Supported Telemetry

![Logs](https://img.shields.io/badge/logs-beta-blue) ![Traces](https://img.shields.io/badge/traces-beta-orange)

## Overview

This exporter supports sending trace and log data to [Logz.io](https://www.logz.io)

### The following configuration options are supported:

Logz.io exporter is utilizing opentelemetry [exporter helper](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md) for `retry_on_failure`,`sending_queue` and `timeout` settings

* `account_token` (Required): Your logz.io account token for your tracing or logs account.
* `region` Your logz.io account [region code](https://docs.logz.io/user-guide/accounts/account-region.html#available-regions). Defaults to `us`. Required only if your logz.io region is different than US.
* `endpoint` Custom endpoint, mostly used for dev or testing. This will override the region parameter.
* `retry_on_failure`
  * `enabled` (default = true)
  * `initial_interval`: Time to wait after the first failure before retrying; ignored if `enabled` is `false`  (default = 5s)
  * `max_interval`: Is the upper bound on backoff; ignored if `enabled` is `false` (default = 30s)
  * `max_elapsed_time`: Is the maximum amount of time spent trying to send a batch; ignored if `enabled` is `false` (default = 300s)
* `sending_queue`
  * `enabled` (default = true)
  * `num_consumers`: Number of consumers that dequeue batches; ignored if `enabled` is `false` (default = 10)
  * `queue_size`: Maximum number of batches kept in memory before dropping; ignored if `enabled` is `false`
    User should calculate this as `num_seconds * requests_per_second` where:
    * `num_seconds` is the number of seconds to buffer in case of a backend outage
    * `requests_per_second` is the average number of requests per seconds.
    * default = 1000
* `timeout`: Time to wait per individual attempt to send data to a backend. default = 30s

#### Tracing example:

* We recommend using `sending_queue::batch` option. Batching helps better compress the data and reduce the number of outgoing connections required to transmit the data.

```yaml theme={null}
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"
      http:
        endpoint: "0.0.0.0:4318"
  jaeger:
    protocols:
      thrift_compact:
        endpoint: "0.0.0.0:6831"
      thrift_binary:
        endpoint: "0.0.0.0:6832"
      grpc:
        endpoint: "0.0.0.0:14250"
      thrift_http:
        endpoint: "0.0.0.0:14268"
exporters:
  logzio/traces:
    account_token: "LOGZIOtraceTOKEN"
    region: "us"
service:
  pipelines:
    traces:
      receivers: [ otlp,jaeger ]
      exporters: [ logzio/traces ]
  telemetry:
    logs:
      level: "debug"
```

#### Logs example:

* We recommend using `sending_queue::batch` option. Batching helps better compress the data and reduce the number of outgoing connections required to transmit the data.
* We recommend adding `type` attribute to classify your log records
* We recommend adding `resource_detection` processor to add metadata to your log records

```yaml theme={null}
receivers:
  file_log:
    include: [ "/private/var/log/*.log" ] # MacOs system logs
    include_file_name: false
    include_file_path: true 
    operators:
      - type: move
        from: attributes["log.file.path"]
        to: attributes["log_file_path"]
    attributes:
      type: <<your-logzio-type>>
processors:
  resource_detection/system:
    detectors: [ "system" ]
    system:
      hostname_sources: [ "os" ]
exporters:
  logzio/logs:
    account_token: "LOGZIOlogsTOKEN"
    region: "us"
service:
  pipelines:
    logs:
      receivers: [file_log]
      processors: [ resource_detection/system ]
      exporters: [logzio/logs]
  telemetry:
    logs:
      level: "debug"
```

#### Metrics:

In order to use the Prometheus backend you must use the standard prometheus\_remote\_write exporter as well. The following [regions](https://docs.logz.io/user-guide/accounts/account-region.html#supported-regions-for-prometheus-metrics) are supported and configured as follows. The Logz.io Listener URL for your region, configured to use port 8052 for http traffic, or port 8053 for https traffic.
Example:

```yaml theme={null}
exporters:
  prometheus_remote_write:
    endpoint: "https://listener.logz.io:8053"
    headers:
      Authorization: "Bearer LOGZIOprometheusTOKEN"
```

Putting these both together it would look like this in a full configuration:

```yaml theme={null}
receivers:
  jaeger:
    protocols:
      thrift_http:
        endpoint: "0.0.0.0:14278"

  prometheus:
    config:
      scrape_configs:
      - job_name: 'ratelimiter'
        scrape_interval: 15s
        static_configs:
          - targets: [ "0.0.0.0:8889" ]

exporters:
  logzio/traces:
    account_token: "LOGZIOtraceTOKEN"
    region: "us"

  prometheus_remote_write:
    endpoint: "https://listener.logz.io:8053"
    headers:
      Authorization: "Bearer LOGZIOprometheusTOKEN"
    
service:
  pipelines:
    traces:
      receivers: [jaeger]
      exporters: [logzio/traces]

    metrics:
      receivers: [prometheus]
      exporters: [prometheus_remote_write]
  
  telemetry:
    logs:
      level: debug #activate debug mode
```

#### Scope Name

When using the logs exporter with logs originating from instrumentation library (i.e opentelemetry log4j2 appender), the scopeName field will be added (if the field is populated in the original log).

````

## Configuration

### Example Configuration

```yaml
logzio:
  account_token: "token"
logzio/2:
  account_token: "token"
  region: eu
  sending_queue:
    enabled: false
  retry_on_failure:
    enabled: true
    max_interval: 5s
````

***

*Last generated: 2026-07-06*
