No release in over a year
A Logstash output plugin that allows logs to be output to OpenTelemetry otlp endpoints.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Logstash Output Plugin for OpenTelemetry

Java CI with Gradle

This is a Java-based 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.

OpenTelemetry

This plugin allows Logstash to output looks to an OpenTelemetry otlp endpoint.

Default field mapping is as per the spec: https://opentelemetry.io/docs/reference/specification/logs/data-model/#elastic-common-schema

@timestamp >> Timestamp
message >> 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
resource Hash No
body Field Reference No
name Field Reference No
severity_text Field Reference No
trace_id Field Reference No
span_id Field Reference No
trace_flags Field Reference No

endpoint

  • This is a required setting.
  • There is no default value for this setting.
  • Value type is uri

An endpoint that supports otlp to which logs are sent.

endpoint_type

  • Deprecated. Replaced with protocol.

protocol

  • Value type is string
  • Default is: grpc

Possible values are grpc or http

compression

  • Value type is string
  • Default is: none

Possible values are gzip or none

resource

  • Value type is hash
  • Default is empty

This hash allows additional fields to be added to the OpenTelemetry Resource field Hash values must be strings.

body

The field to reference as the Otel Body field.

severity_text

The field to reference as the Otel Severity Text field.

trace_id

The field to reference as the Otel Trace ID field.

span_id

The field to reference as the Otel Span ID field.

trace_flags

The field to reference as the Otel Trace Flags field.

Building

make gem

Running locally

docker-compose up

Notes

Warning This plugin depends on OpenTelemetry logging libraries are that are alpha quality.