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

Provide OpenTelemetry OTLP/HTTP exporter #21535

Closed
knutwannheden opened this issue Nov 18, 2021 · 33 comments · Fixed by #35156
Closed

Provide OpenTelemetry OTLP/HTTP exporter #21535

knutwannheden opened this issue Nov 18, 2021 · 33 comments · Fixed by #35156
Assignees
Labels
area/tracing kind/enhancement New feature or request
Milestone

Comments

@knutwannheden
Copy link
Contributor

Description

The current quarkus-opentelemetry-exporter-otlp extension exports OpenTelemetry traces using the OTLP/gRPC protocol (using the OtlpGrpcSpanExporter from the io.opentelemetry:opentelemetry-exporter-otlp-trace module). The OpenTelemetry SDK however also includes a OtlpHttpSpanExporter (in module io.opentelemetry:opentelemetry-exporter-otlp-http-trace).

We would like to be able to export our OpenTelemetry traces using the OTLP/HTTP transport (see also https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlphttp).

Implementation ideas

I think the most straight-forward solution would be to provide a new extension with a config namespace of quarkus.opentelemetry.tracer.exporter.otlp-http (in contrast to the current quarkus.opentelemetry.tracer.exporter.otlp which would pertain to the OTLP/gRPC exporter only). The config keys would basically be exactly the same, as the OTLP/HTTP exporter builder exposes the same configuration options.

The user would then have choice of either adding the quarkus-opentelemetry-exporter-otlp or the quarkus-opentelemetry-exporter-otlp-http extension.

@knutwannheden knutwannheden added the kind/enhancement New feature or request label Nov 18, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 18, 2021

/cc @radcortez

@radcortez
Copy link
Member

Sounds good. Ideally we should align as much as possible with the OTel SDK and libraries.

@knutwannheden
Copy link
Contributor Author

We will look into submitting a PR with our Quarkus extension and adapting the documentation.

@radcortez
Copy link
Member

Thanks :)

knutwannheden added a commit to knutwannheden/quarkus that referenced this issue Nov 30, 2021
Adds an extension to provide on OTLP/HTTP exporter as described here https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlphttp and as implemented by the OpenTelemetry SDK. This as an alternative to the standard OTLP/gRPC exporter.

Fixes quarkusio#21535
knutwannheden added a commit to knutwannheden/quarkus that referenced this issue Nov 30, 2021
Adds an extension to provide on OTLP/HTTP exporter as described here https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlphttp and as implemented by the OpenTelemetry SDK. This as an alternative to the standard OTLP/gRPC exporter.

Fixes quarkusio#21535
knutwannheden added a commit to knutwannheden/quarkus that referenced this issue Nov 30, 2021
Adds an extension to provide on OTLP/HTTP exporter as described here https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlphttp and as implemented by the OpenTelemetry SDK. This as an alternative to the standard OTLP/gRPC exporter.

Fixes quarkusio#21535
knutwannheden added a commit to knutwannheden/quarkus that referenced this issue Nov 30, 2021
Adds an extension to provide on OTLP/HTTP exporter as described here https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlphttp and as implemented by the OpenTelemetry SDK. This as an alternative to the standard OTLP/gRPC exporter.

Fixes quarkusio#21535
@radcortez radcortez added this to Backlog in Observability roadmap [Deprecated] via automation Jun 20, 2022
@radcortez radcortez moved this from Backlog to Current Qtr in Observability roadmap [Deprecated] Jun 20, 2022
@fage88
Copy link

fage88 commented Jul 26, 2022

any update on this one? I am very interested to see this

@radcortez
Copy link
Member

We want to implement #26444 first, which is underway. This will allow us to support the expected configuration for the OTLP http exporter.

@fehmathais
Copy link

Guys, any updates on this? Are you still working on it? I've got realized that is such important to the library.
The @knutwannheden idea seems very interesting...

@radcortez
Copy link
Member

The OTel Auto Config works took a bit longer than expected. It is mainly done, and it should be easier to support OTLP/HTTP with that, so yes, we are still working on this. Sorry for the delay.

@geoand
Copy link
Contributor

geoand commented Jul 12, 2023

I would very much like us to do this right after #34647 and #34545 get merged in order to avoid conflicts.

Also, what do we think about providing a Vert.x client based implementation (similar to what #34647 does for gRPC)?

@radcortez
Copy link
Member

Also, what do we think about providing a Vert.x client based implementation (similar to what #34647 does for gRPC)?

I think we have to. Until now, we always relied on the exporters provided by OTel, and we started the support with gRPC. We never added support for the HTTP one (hence the issue). The idea was to add it at some point. I haven't looked into the OTel HTTP exported, but most likely, the implementation also relies on OKHttp.

@geoand
Copy link
Contributor

geoand commented Jul 12, 2023

I haven't looked into the OTel HTTP exported, but most likely, the implementation also relies on OKHttp

Currently, yes. But the next release will also have a JDK HTTP Client implementation.

@radcortez
Copy link
Member

Hum, in that case, we should use their implementation to save us some work.

@geoand
Copy link
Contributor

geoand commented Jul 12, 2023

Yeah, that's certainly the easiest thing to do, but it probably does result in a loading a bunch of extra classes that otherwise would not be.

But I do agree we should start with it - although it will require waiting for the next OTel release (which I doubt is a problem).

@radcortez
Copy link
Member

Ok, my recommendation is to wait for the OTel implementation, but I won't stop you to provide our own implementation if you are bored :P

@geoand
Copy link
Contributor

geoand commented Jul 12, 2023

😂.

I'll have a look

@geoand
Copy link
Contributor

geoand commented Jul 13, 2023

I see that we are on 1.25 while upstream has released 1.28 that includes the change I mentioned above.

So my plan is that when the rest of my PRs get merged, I will first open a PR updating to the latest version (with any changes necessary) and then start working on this.

@radcortez
Copy link
Member

Sure.

@geoand
Copy link
Contributor

geoand commented Jul 18, 2023

I want to get #34545 in before working on this because is can cause more conflicts

@geoand
Copy link
Contributor

geoand commented Jul 18, 2023

So my plan is that when the rest of my PRs get merged, I will first open a PR updating to the latest version (with any changes necessary) and then start working on this.

@brunobat it seems like the bump to 1.28 breaks a few things.
It's probably best if you handle the upgrade since you have a lot more context than I do.

@brunobat
Copy link
Contributor

Sure, don't worry.

@geoand geoand self-assigned this Jul 19, 2023
@geoand
Copy link
Contributor

geoand commented Jul 19, 2023

I'll look into this once #34851 is in

@geoand
Copy link
Contributor

geoand commented Jul 31, 2023

I assume this ticket is about providing http/json support for quarkus.otel.exporter.otlp.traces.protocol, correct?

@geoand
Copy link
Contributor

geoand commented Jul 31, 2023

I am also a little confused by this. Isn't our exporter a gRPC exporter?

@brunobat
Copy link
Contributor

There is not yet JSON serialisation for OTel's OTLP. PR still pending.
HTTP payload must be protobuf.

@geoand
Copy link
Contributor

geoand commented Jul 31, 2023

Gotcha, however my confusion remains, as it seems to me that what we currently provide in our code is GRPC and this ticket is about adding HTTP_PROTOBUF. Is this understanding flawed?

@radcortez
Copy link
Member

@geoand
Copy link
Contributor

geoand commented Jul 31, 2023

Thanks.

So just to be sure we are all on the same page:

  • Our current default of http/protobuf is incorrect (only as a name, since we only supported this exporter anyway) and should be changed to grpc
  • We want to add support http/protobuf in this PR thus allowing the user to see set quarkus.otel.exporter.otlp.traces.protocol to either grpc or http/protobuf.

Correct?

@brunobat
Copy link
Contributor

Yes @geoand. It seems correct to me.

@radcortez
Copy link
Member

Yes, not sure why the name is incorrect.

I think we may want to keep the HTTP protobuf implementation with http name only and the json one as http+json to follow OTel conventions:

https://github.com/open-telemetry/oteps/blob/main/text/0099-otlp-http.md
https://github.com/open-telemetry/oteps/blob/main/text/0122-otlp-http-json.md

@geoand
Copy link
Contributor

geoand commented Jul 31, 2023

Thanks for the clarification folks

@geoand
Copy link
Contributor

geoand commented Jul 31, 2023

I have an implementation that seems to work, but now I need to add an integration test module.

@geoand
Copy link
Contributor

geoand commented Jul 31, 2023

Change is ready. I'll open a PR once #34851 is in.

@geoand
Copy link
Contributor

geoand commented Aug 2, 2023

I opened #35156

Observability roadmap [Deprecated] automation moved this from Current Qtr to Done Aug 2, 2023
geoand added a commit that referenced this issue Aug 2, 2023
Introduce HTTP OTLP exporter
@quarkus-bot quarkus-bot bot added this to the 3.3 - main milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing kind/enhancement New feature or request
6 participants