quarkiverse / quarkus-opentelemetry-exporter

Quarkus extensions related with additional OpenTelemetry exporters
Apache License 2.0
13 stars 7 forks source link

Use quarkus-google-cloud-services gRCP common lib to avoid duplication #57

Open loicmathieu opened 1 year ago

loicmathieu commented 1 year ago

Hi,

The Quarkus Google Cloud Services extension pack contains GraalVM substitutions for gRCP and Google Cloud Auth support. It is already used by the Micrometer Google Cloud exporter, it could also be used by the Opentelemetry Google Cloud exported provided in this extension.

The substitution are here: https://github.com/quarkiverse/quarkus-google-cloud-services/blob/main/common/grpc/src/main/java/io/quarkiverse/googlecloudservices/common/grpc/runtime/graal/GoogleApiGaxGrpcSubstitutions.java

It would avoid having duplicate substitution and possibly having native configuration on multiple modules that may be in conflict.

Note that Google Cloud have native support that may be use instead of providing our own, I still have on my todo list to upstream the substitution on our side.

We can discuss this on Zulip if needed.

t0xa commented 1 year ago

Hello Loïc,

I've made changes you've suggested.

As usual there is an issue with Native build - https://github.com/t0xa/quarkus-opentelemetry-exporter/actions/runs/4697207041/jobs/8328030406

I've compared substitutions defined in quarkus-google-cloud-services gRCP common and in the current version. The only difference is the usage of mtls Channel Credentials (see below). I've tried to move this logic into quarkus-google-cloud-services gRCP common locally but it still gives me an error.

Any pointers will be very helpful.

loicmathieu commented 1 year ago

I copied the missing substitution for InternalLoggerFactory, see https://github.com/quarkiverse/quarkus-google-cloud-services/pull/414

As far as I remember the difference for between the two substitutions is around automatic auth for AppEngine, as AppEngine didn't support native image I just disable its auth.