Plugin
Advanced Configuration

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.

OptionTypeDefaultDescription
apiKeystringAPI key that starts with 'logql:' (required)
environmentstringEnvironment name (trimmed, lowercased, max length 128)
timeoutnumber15000Timeout duration in milliseconds (minimum 0)
sendVariablesbooleanfalseFlag indicating whether to send variables
sendHeadersbooleanfalseFlag indicating whether to send headers
reportIntervalMsnumber10000Interval duration in milliseconds for reporting
reportEntriesThresholdnumber1024Threshold number of entries for reporting
cacheSizenumber16384Size of the LRU cache, must be greater than 0
samplingnumber1.0Sampling rate between 0 and 1
endpointstringEndpoint 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