PostHogLogsConfig
Properties
| Name | Type |
|---|---|
beforeSend | BeforeSendLogFn | BeforeSendLogFn[] |
Pre-send filter. See for shape and examples. Configure as a single function or a chain. | |
environment | string |
Deployment environment attached as OTLP | |
flushIntervalMs | number |
How often the periodic background flush fires (ms). Records also flush eagerly when the buffer fills, on AppState changes (RN), and on | |
maxBatchRecordsPerPost | number |
Max records per outbound POST. Keeps each request under the server's 2 MB cap. On a 413 response, the SDK halves this value, retries the same records, then ramps back up by 1 per healthy send. A 413 on a single-record batch drops the record (it's larger than the server can accept regardless of batch size). Default: 50 (RN) / 100 (browser). | |
maxBufferSize | number |
Number of buffered records that triggers an immediate flush. Records also flush on the periodic interval and on | |
rateCap | {
maxLogs?: number;
windowMs?: number;
} |
Tumbling-window rate cap. Bounds how many records can be captured within a sliding (technically tumbling) time window. Records exceeding the cap are dropped synchronously at | |
resourceAttributes | Record<string, LogAttributeValue> |
Extra OTLP resource attributes attached to every record. Spread first; SDK-controlled keys ( | |
serviceName | string |
Service name attached to every record as the OTLP | |
serviceVersion | string |
Service version attached as OTLP | |