struct
Logit::Backend::OTLP::Config
- Logit::Backend::OTLP::Config
- Struct
- Value
- Object
Overview
Configuration options for the OTLP backend.
All timing values use Time::Span for type safety.
Resource attributes follow OpenTelemetry semantic conventions.
Defined in:
logit/backends/otlp/config.crConstructors
Instance Method Summary
-
#batch_size : Int32
Maximum number of events per batch.
-
#batch_size=(batch_size : Int32)
Maximum number of events per batch.
-
#endpoint : String
OTLP HTTP endpoint URL.
-
#endpoint=(endpoint : String)
OTLP HTTP endpoint URL.
-
#flush_interval : Time::Span
Time between automatic flushes.
-
#flush_interval=(flush_interval : Time::Span)
Time between automatic flushes.
-
#headers : Hash(String, String)
HTTP headers to include with each request.
-
#headers=(headers : Hash(String, String))
HTTP headers to include with each request.
-
#resource_attributes : Hash(String, String)
Resource attributes attached to all log records.
-
#resource_attributes=(resource_attributes : Hash(String, String))
Resource attributes attached to all log records.
-
#scope_name : String
Instrumentation scope name.
-
#scope_name=(scope_name : String)
Instrumentation scope name.
-
#scope_version : String
Instrumentation scope version.
-
#scope_version=(scope_version : String)
Instrumentation scope version.
-
#timeout : Time::Span
HTTP request timeout.
-
#timeout=(timeout : Time::Span)
HTTP request timeout.
Constructor Detail
Instance Method Detail
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.