Skip to main content

Lago Configuration

The lago plugin reports gateway usage events to Lago for metered billing with subscription IDs, billable metrics, and custom properties. Configuration covers plugin parameters and plugin metadata.

Parameters​

See plugin common configurations for configuration options available to all plugins.

  • endpoint_addrs

    array[string]

    required

    valid value:

    one or more HTTP or HTTPS origins

    Lago API origins. One origin is selected randomly for each batch.

  • endpoint_uri

    string

    default: /api/v1/events/batch


    Lago batch-events API path appended to the selected origin.

  • token

    string

    required


    Lago organization API key sent as a Bearer token. This field is marked for encrypted storage when gateway data encryption is enabled. Protect the plaintext value in declarative files and secret-delivery workflows.

  • event_transaction_id

    string

    required


    Unique event identifier. Supports built-in-variable templates. The plugin reuses the same identifier and timestamp on retries. Lago deduplicates by transaction ID; ClickHouse-backed deployments also include the timestamp in the deduplication key.

  • event_subscription_id

    string

    required


    External Lago subscription ID. Supports built-in-variable templates.

  • event_code

    string

    required


    Code of the Lago billable metric associated with the event.

  • event_properties

    object


    String-valued event properties. Values can contain built-in-variable templates.

  • ssl_verify

    boolean

    default: true


    If true, verify the Lago API TLS certificate.

  • timeout

    integer

    default: 3000

    valid value:

    between 1 and 60000 inclusive

    Lago request timeout in milliseconds.

  • keepalive

    boolean

    default: true


    If true, reuse Lago API connections.

  • keepalive_timeout

    integer

    default: 60000

    valid value:

    greater than or equal to 1000

    Idle keepalive timeout in milliseconds.

  • keepalive_pool

    integer

    default: 5

    valid value:

    greater than or equal to 1

    Maximum connections in the keepalive pool.

  • batch_max_size

    integer

    default: 100

    valid value:

    greater than 0

    Maximum events in one Lago batch. Lago's batch API defaults to a limit of 100 events, but self-hosted deployments can override the limit.

  • name

    string

    default: lago logger


    Batch-processor identifier exported in batch-processing metrics.

  • inactive_timeout

    integer

    default: 5


    Seconds to wait for new events before sending the batch.

  • buffer_duration

    integer

    default: 60


    Maximum seconds from the earliest event before sending the batch.

  • max_retry_count

    integer


    Retry attempts after the initial failed delivery.

  • retry_delay

    integer

    default: 1


    Seconds between delivery retries.

Plugin Metadata​

The following attributes configure shared Lago batch-processing behavior through plugin metadata.

  • max_pending_entries

    integer

    default: 8192


    Maximum queued events. New events are dropped when the backlog reaches this limit.