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

Replace OkHttp tracing grpc backend with Vert.x #34647

Merged
merged 4 commits into from
Jul 18, 2023
Merged

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Jul 10, 2023

Closes: #32238

TODO:

  • Remove OkHttp dependency
  • Fix native
  • Perform hardening ?

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 10, 2023

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

@brunobat
Copy link
Contributor

I'll review by the end of the week.

@geoand
Copy link
Contributor Author

geoand commented Jul 11, 2023

Thanks.

I still need to make Vert.x related improvements to this, I'll let you know when I think it's ready to go.

@geoand
Copy link
Contributor Author

geoand commented Jul 11, 2023

I think it's in a shape to be reviewed now

Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - at least the client.

@geoand geoand marked this pull request as ready for review July 12, 2023 11:05
@gastaldi
Copy link
Contributor

Can we remove the com.squareup.okhttp3:* dependencies from the BOM also?

@geoand
Copy link
Contributor Author

geoand commented Jul 12, 2023

No, it's used elsewhere as well (I remember an issue with Infinispan)

Copy link
Contributor

@brunobat brunobat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still checking the details on the PR, but one thing we must have is integration tests with the OTel Collector.
The OTel side has them for their stock exporter and we should too.

@geoand
Copy link
Contributor Author

geoand commented Jul 14, 2023

Where are those tests?

@brunobat
Copy link
Contributor

We have a test here: https://github.com/open-telemetry/opentelemetry-java/blob/main/integration-tests/otlp/src/main/java/io/opentelemetry/integrationtest/OtlpExporterIntegrationTest.java

Also, we need to consider if we shouldn't be using a much simpler abstractions, available here:
https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/sender

This is using a new SPI that allows to plug your own client.

@geoand
Copy link
Contributor Author

geoand commented Jul 14, 2023

We have a test here: https://github.com/open-telemetry/opentelemetry-java/blob/main/integration-tests/otlp/src/main/java/io/opentelemetry/integrationtest/OtlpExporterIntegrationTest.java

Thanks

Also, we need to consider if we shouldn't be using a much simpler abstractions, available here:
https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/sender

Those are only for HTTP, they do not work for gRPC.
I am already aware of this SPI and plan to use it for #21535

@brunobat
Copy link
Contributor

Thanks!

@brunobat
Copy link
Contributor

I wonder if the SPI cannot be used anyway... We just need to switch based on the protocol config...
https://quarkus.io/guides/opentelemetry#quarkus-opentelemetry_quarkus.otel.exporter.otlp.traces.protocol

@geoand
Copy link
Contributor Author

geoand commented Jul 14, 2023

I wonder if the SPI cannot be used anyway

I don't see how as the gRPC exporters don't use HttpSender at all

@geoand
Copy link
Contributor Author

geoand commented Jul 14, 2023

Seems my IntelliJ setup is completely busted, so I won't be adding the test today. If you want to take a swing at it, feel free to push a new commit into this PR

@brunobat
Copy link
Contributor

looking at the test right now

@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2023

I was actually able to fix my IntelliJ setup so I am looking into adding the required test

@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2023

As part of the test work, I'll also probably add TSL config support - looking into both now

@brunobat
Copy link
Contributor

Ok @geoand. Will work on the baggage problem instead.

@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2023

Sounds good!

@quarkus-bot quarkus-bot bot added the area/dependencies Pull requests that update a dependency file label Jul 17, 2023
@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2023

PR updated with an integration test uses the same testing philosophy as the original opentelemetry-java but has two key differences:

  • Uses Vert.x instead of Armeria
  • It's an actual integration test in the sense that it exercises a Quarkus application that uses the exporter (meaning that we also test Quarkus configuration and all)

Furthermore, the final commit also adds support for TLS configuration of the exporter.

@geoand geoand requested a review from brunobat July 17, 2023 12:49
|| !options.getPemKeyCertOptions().getCertPaths().isEmpty()
|| !options.getPemKeyCertOptions().getKeyPaths().isEmpty()) {
options.setSsl(true);
options.setUseAlpn(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cescoffier I found that is is necessary, can you confirm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that based on the error message I was seeing, it seemed like Alpn is necessary when using HTTP2. Did I understand correctly?

Copy link
Contributor

@brunobat brunobat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Getting rid of Armeria was perfect.

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 17, 2023

Failing Jobs - Building bd6cfd6

Status Name Step Failures Logs Raw logs
✔️ Maven Tests - JDK 11
Maven Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs

@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2023

@brunobat all good to merge?

Copy link
Contributor

@brunobat brunobat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @geoand !

@geoand
Copy link
Contributor Author

geoand commented Jul 18, 2023

🙏🏼

@geoand geoand merged commit abbbe5f into quarkusio:main Jul 18, 2023
@geoand geoand deleted the #32238 branch July 18, 2023 08:24
@quarkus-bot quarkus-bot bot added this to the 3.3 - main milestone Jul 18, 2023
@geoand geoand changed the title Replace OkHttp tracing backend with Vert.x Replace OkHttp tracing grpc backend with Vert.x Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OOM in Quarkus 3.0.0.Beta1 caused by okio via OpenTelemetry
6 participants