Agent Settings
Every LOGDROP_* setting of the LogDrop PHP agent, with its default and range.
The LogDrop PHP agent is configured only with LOGDROP_* settings, the same as the Java agent. On Kubernetes the trace injector sets the required ones for you as environment variables; the agent's ini file reads them when PHP starts, so php-fpm workers get them too.
| Setting | Default | Meaning |
|---|---|---|
LOGDROP_ENDPOINT | none | The traces endpoint, https://otel.logdrop.io. HTTPS, without credentials, query or fragment. Empty turns tracing off |
LOGDROP_INGEST_KEY_FILE | none | The file with the traces ingest key, read again for every request (a long-running CLI worker every 10 seconds). The key itself (LOGDROP_INGEST_KEY) works only where PHP sees the environment (the CLI, Apache), never in php-fpm workers: use the file |
LOGDROP_SERVICE | none, required | Service name |
LOGDROP_SERVICE_NAMESPACE | empty | Service group in APM |
LOGDROP_ENVIRONMENT | production | Environment |
LOGDROP_RELEASE | empty | Release or version of your service |
LOGDROP_SERVICE_INSTANCE_ID | On Kubernetes stable per pod and container, so restarts keep it; all the container's PHP workers share it | Instance ID in APM |
LOGDROP_ALLOWED_ATTRIBUTE_KEYS | empty | Comma-separated custom attribute keys to send, at most 128 |
LOGDROP_CA_FILE | empty | A PEM file with a private CA, at most 1 MiB. Only needed for an on-premises LogDrop installation with its own CA; contact LogDrop support to set it up for PHP |
LOGDROP_ENABLED | true | false turns the agent off |
LOGDROP_DEBUG | false | Agent diagnostics on standard error. They never include the ingest key or span contents |
LOGDROP_MAX_ATTRIBUTES | 24 | Attributes kept per span, and per event and link (1 to 128). LogDrop refuses more than 48 per span and more than 24 per event or link, so raise it only for spans without events and links, and never above 48 |
LOGDROP_MAX_EVENTS, LOGDROP_MAX_LINKS | 16, 16 | Events and links per span (1 to 128). Keep them at 16 or less: LogDrop refuses more |
LOGDROP_MAX_STRING_LENGTH | 256 | Characters per text value (1 to 4,096). Keep it at 512 or less: LogDrop refuses values over 2,048 bytes |
LOGDROP_MAX_ACTIVE_SPANS | 1,024 | Spans open at the same time in one PHP process (1 to 100,000). New spans are not recorded while the limit is reached |
LOGDROP_MAX_QUEUE_SIZE | 2,048 | Spans waiting to be sent from one request (1 to 65,536). New spans are dropped while the queue is full |
LOGDROP_MAX_EXPORT_BATCH_SIZE | 128 | Spans per request (1 to 256, and at most the queue size). Lower it to 64 if your spans carry many long custom attributes |
LOGDROP_SCHEDULE_DELAY | 1s | How long the container's spool collects spans before a request is sent (10ms to 5s) |
LOGDROP_EXPORT_TIMEOUT | 5s | Timeout per request (100ms to 30s) |
LOGDROP_SPOOL_DIR | the temporary directory | Where the container's PHP workers batch their spans. The trace injector sets it to a small volume of its own |
Durations are a whole number followed by ms or s, for example 200ms or 5s. The values of LOGDROP_SERVICE, LOGDROP_SERVICE_NAMESPACE, LOGDROP_ENVIRONMENT, LOGDROP_RELEASE and LOGDROP_SERVICE_INSTANCE_ID are at most 128 characters, without control characters.
On Kubernetes
The trace injector sets the endpoint, the key file, the service, the service group, the environment, the release, the spool and the pod's identity from the chart values and the pod's annotations, and adds the agent through PHP_INI_SCAN_DIR. Variables you set on the container win over the injected LOGDROP_* ones. See Kubernetes.
Invalid settings
An invalid setting turns recording off with one line on standard error that names the setting, never its value:
[logdrop-agent] ERROR LogDrop tracing is disabled: LOGDROP_SERVICE is required.The line appears once per PHP worker process. The application always runs; only tracing is off.
OpenTelemetry settings
OpenTelemetry's own exporter, endpoint, sampler, header-capture and resource settings (OTEL_* variables) have no effect on what the agent sends: it always exports to LogDrop, never samples, propagates W3C trace context and baggage, never captures headers and sends only LogDrop's resource attributes. Configure the agent with LOGDROP_* only.
.png)