quickwit-oss / quickwit

Cloud-native search engine for observability. An open-source alternative to Datadog, Elasticsearch, Loki, and Tempo.
https://quickwit.io
Other
7.79k stars 311 forks source link

[Distributed Tracing] Documentation on ingestion of OpenTelemetry HTTP protocol data #4769

Open jennydaman opened 5 months ago

jennydaman commented 5 months ago

Hi there,

I am developing a Rust service using the opentelemetry-otlp crate, and I am evaluating Quickwit for tracing.

Project: https://github.com/FNNDSC/oxidicom

Sadly, an important dependency of my library is not async, so I cannot use gRPC (which depends on the tonic crate, which depends on async). In my Cargo.toml I have opentelemetry-otlp installed with these features:

opentelemetry-otlp = { version = "0.15.0", features = ["reqwest-blocking-client", "http-proto"], default-features = false }

I am able to ship traces to an OpenTelemetry collector just fine. For efficiency, I would like to consider cutting out the middle man and sending my traces directly to Quickwit without using the OpenTelemetry collector.

https://quickwit.io/docs/distributed-tracing/overview <-- here it says:

Quickwit supports natively the OpenTelemetry gRPC and HTTP (protobuf only) protocol and the Jaeger gRPC API (SpanReader only).

However, I can't find any documentation about how to ingest HTTP OTEL data.

M0NsTeRRR commented 1 month ago

Hello,

I had the same issue. I searched through GitHub and saw that OTLP HTTP was implemented in #4335. The endpoint looks like https://demo.quickwit.fr/api/v1/otlp/v1/logs for logs (replace logs with traces for trace endpoint).

https://github.com/quickwit-oss/quickwit/blob/main/quickwit/quickwit-serve/src/rest.rs#L244 https://github.com/quickwit-oss/quickwit/blob/main/quickwit/quickwit-serve/src/otlp_api/rest_handler.rs#L61

M0NsTeRRR commented 1 month ago

It looks like the endpoint is bugged with compression (tested with grafana alloy and a custom script).

This config works

otelcol.exporter.otlphttp "log" {
        client {
                endpoint = "https://demo.quickwit.fr"
                compression = "none"
                tls {
                   insecure = true
                   insecure_skip_verify = true
                }
        }
        logs_endpoint = "https://demo.quickwit.fr/api/v1/otlp/v1/logs"
}
M0NsTeRRR commented 1 month ago

The compressions issue was resolved in https://github.com/quickwit-oss/quickwit/pull/5260