Advanced configuration (plugin)
When configuring the plugin, only the apiKey
is required but we recommend to always set the environment
too.
Other options are reserved for advanced usage and should be omitted most of the time.
There are two ways to configure the plugin, either by passing an config
object during initialization or using environment variables.
Configuring during initialization
This is the main way to configure the plugin and takes precedence over environment variables.
Option | Type | Default | Description |
---|---|---|---|
apiKey | string | API key that starts with 'logql:' (required) | |
environment | string | Environment name (trimmed, lowercased, max length 128) | |
timeout | number | 15000 | Timeout duration in milliseconds (minimum 0) |
sendVariables | boolean | false | Flag indicating whether to send variables |
sendHeaders | boolean | false | Flag indicating whether to send headers |
reportIntervalMs | number | 10000 | Interval duration in milliseconds for reporting |
reportEntriesThreshold | number | 1024 | Threshold number of entries for reporting |
cacheSize | number | 16384 | Size of the LRU cache, must be greater than 0 |
sampling | number | 1.0 | Sampling rate between 0 and 1 |
endpoint | string | Endpoint URL for the API (default: https://ingress.logql.io) |
Environment variables
All options are also available as environment variables. The variable names will be the option name in uppercase and prefixed with LOGQL_
.
Config name | Variable name |
---|---|
apiKey | LOGQL_API_KEY |
environment | LOGQL_ENVIRONMENT |
timeout | LOGQL_TIMEOUT |
sendVariables | LOGQL_SEND_VARIABLES |
sendHeaders | LOGQL_SEND_HEADERS |
reportIntervalMs | LOGQL_REPORT_INTERVAL_MS |
reportEntriesThreshold | LOGQL_REPORT_ENTRIES_THRESHOLD |
cacheSize | LOGQL_CACHE_SIZE |
endpoint | LOGQL_ENDPOINT |