Logit::Backend::OTLP::Config
Configuration options for the OTLP backend.
All timing values use Time::Span for type safety.
Resource attributes follow OpenTelemetry semantic conventions.
Constructors
Instance methods
Maximum number of events per batch.
When the buffer reaches this size, it will be flushed immediately. Lower values reduce memory usage but increase HTTP overhead.
Maximum number of events per batch.
When the buffer reaches this size, it will be flushed immediately. Lower values reduce memory usage but increase HTTP overhead.
OTLP HTTP endpoint URL.
Should point to an OTLP-compatible logs endpoint, typically
ending in /v1/logs.
Examples:
http://localhost:4318/v1/logs(local collector)https://otlp.example.com/v1/logs(remote collector)
OTLP HTTP endpoint URL.
Should point to an OTLP-compatible logs endpoint, typically
ending in /v1/logs.
Examples:
http://localhost:4318/v1/logs(local collector)https://otlp.example.com/v1/logs(remote collector)
Time between automatic flushes.
The backend will flush buffered events at this interval even if the batch size hasn't been reached. Set to a shorter interval for lower latency at the cost of more HTTP requests.
Time between automatic flushes.
The backend will flush buffered events at this interval even if the batch size hasn't been reached. Set to a shorter interval for lower latency at the cost of more HTTP requests.
HTTP headers to include with each request.
Use this for authentication tokens or custom metadata. Common headers:
Authorization: Bearer <token>X-API-Key: <key>
HTTP headers to include with each request.
Use this for authentication tokens or custom metadata. Common headers:
Authorization: Bearer <token>X-API-Key: <key>
Resource attributes attached to all log records.
These identify the source of logs in your observability platform. Common attributes (following OpenTelemetry semantic conventions):
service.name- Logical name of the serviceservice.version- Version of the serviceservice.namespace- Namespace for the servicedeployment.environment- Deployment environment (production, staging)host.name- Hostname of the machine
Resource attributes attached to all log records.
These identify the source of logs in your observability platform. Common attributes (following OpenTelemetry semantic conventions):
service.name- Logical name of the serviceservice.version- Version of the serviceservice.namespace- Namespace for the servicedeployment.environment- Deployment environment (production, staging)host.name- Hostname of the machine
Instrumentation scope name.
Identifies the library producing the logs. Defaults to "logit".
Instrumentation scope name.
Identifies the library producing the logs. Defaults to "logit".
Instrumentation scope version.
Version of the instrumentation library. Defaults to Logit::VERSION.
Instrumentation scope version.
Version of the instrumentation library. Defaults to Logit::VERSION.
HTTP request timeout.
Applies to both connection and read timeouts. If the collector doesn't respond within this time, the batch is dropped.
HTTP request timeout.
Applies to both connection and read timeouts. If the collector doesn't respond within this time, the batch is dropped.