Logstash Java Plugin
This is a Java plugin for Logstash.
It is fully free and fully open source. The license is Apache 2.0, meaning you are free to use it however you want.
The documentation for Logstash Java plugins is available here.
OpenTelemetry
This plugin allows Logstash to output looks to an OpenTelemetry otlp endpoint.
Fields below are mapped as per the spec: https://opentelemetry.io/docs/reference/specification/logs/data-model/#elastic-common-schema
@timestamp >> Timestamp
log.level >> SeverityText
>> Body
All other fields are attached as Attributes.
Installation
logstash-plugin install logstash-output-opentelemetry
Usage
input {
generator {
count => 10
add_field => {
"log.level" => "WARN"
}
}
}
output {
opentelemetry {
endpoint => "http://otel:4317"
protocol => "grpc"
compression => "none"
}
}
Options
Setting | Input Type | Required |
---|---|---|
endpoint | uri | Yes |
endpoint_type | string | No (Deprecated) |
protocol | string, one of ["grpc", "http"] | No |
compression | string, one of ["gzip", "none"] | No |
endpoint
- This is a required setting.
- There is no default value for this setting.
- Value type is uri
endpoint_type
- Deprecated. Replaced with
protocol
.
protocol
- Value type is string
- Default is:
grpc
compression
- Value type is string
- Default is:
none
Building
make gem
Running locally
docker-compose up
Notes
Warning This plugin depends on OpenTelemetry logging libraries are that are alpha quality.