Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OpenTelemetry OTLP/HTTP as addition to OTLP/gRPC #4983

Open
KarstenSchnitter opened this issue Sep 27, 2024 · 3 comments
Open

Support OpenTelemetry OTLP/HTTP as addition to OTLP/gRPC #4983

KarstenSchnitter opened this issue Sep 27, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@KarstenSchnitter
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The current OpenTelemetry specification describes two transport channels:

  • OTLP/gRPC, which is currently supported by DataPrepper for logs, metrics, and traces;
  • OTLP/HTTP, using a binary(protobuf) or JSON format.

All formats use the same protobuf scheme. OTLP/HTTP is currently not supported by DataPrepper. The OpenTelemetry specification has changed since the original implementation of the DataPrepper OTel sources. It now recommends OTLP/HTTP + protobuf to be the default protocol per opentelemetry-specification#1885. Many OpenTelemetry SDKs nowadays use OTLP/HTTP that way and not all OpenTelemetry instrumentations even support OTLP/gRPC. Connecting such solutions to DataPrepper is not possible without a protocol translation.

Describe the solution you'd like
DataPrepper should add support for OTLP/HTTP to the Otel*Sources. The configuration should enable a selection of the protocol to be supported. Ideally, it is possible to use both protocols simultaneously. This enables connecting different services to the same DataPrepper instance.

Describe alternatives you've considered (Optional)

  1. The OpenTelemetry Collector can be used to translate between OTLP/gRPC and OTLP/HTTP and vice versa. However, this requires an additional component in the signal stream. Direct support by DataPrepper would be a better approach.

  2. The HTTP source could be used for the OTLP/HTTP with JSON format. It would require a complex JSON parsing configuration due to the nested arrays in the OTel data structures. In this configuration, the data would also not pass through the OTel processors easily.

Additional context
There has been a previous issue about OTLP/HTTP support in the OpenDistro project: opendistro-for-elasticsearch/data-prepper#283.

@KarstenSchnitter
Copy link
Collaborator Author

There is a comment on how to use OTLP/HTTP with trace in #1152 (comment). It introduced the unframed_requests options:

otel_trace_source:
      ssl: false
      unframed_requests: true

This option is only available for the OTelTraceSource though. It is not supported for logs and metrics. A quick win would be to provide this options for those signals, too.

@dlvenable
Copy link
Member

@KarstenSchnitter , To be sure, is the unframed_requests what we need, or is there something else?

Would you be able to add these to OTel Logs and Metrics?

@dlvenable dlvenable added enhancement New feature or request and removed untriaged labels Oct 1, 2024
@KarstenSchnitter
Copy link
Collaborator Author

The unframed_requests seem to be a good stating point. However, this approach still needs special configuration by the sender. I asked @TomasLongo to take a look at this. We will investigate this issue and come up with some recommendations on what needs to change. As far as I understand armeria, the intended way would be to define a specific server for OTLP/HTTP and not reutilise the gRPC endpoint.

Within OpenTelemetry OTLP/gRPC uses default port 4317 and OTLP/HTTP uses default port 4318. However, due to the vastly distinct paths it is possible to run both protocols at the same endpoints easily. We need to discuss, whether there should be a configuration parameter to select the protocol or whether Data Prepper should always provide both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants