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

OTel LateBoundSampler logs warning if using Liquibase and JDBC instrumentation #29987

Closed
famod opened this issue Dec 20, 2022 · 7 comments · Fixed by #34545
Closed

OTel LateBoundSampler logs warning if using Liquibase and JDBC instrumentation #29987

famod opened this issue Dec 20, 2022 · 7 comments · Fixed by #34545
Assignees
Labels
area/tracing kind/bug Something isn't working
Milestone

Comments

@famod
Copy link
Member

famod commented Dec 20, 2022

Describe the bug

I was irritated by the following message very early during boot and started digging:

WARN  [io.qua.ope.run.tra.LateBoundSampler] (JPA Startup Thread) No Sampler delegate specified, no action taken.

Turns out that when you have JDBC instrumentation and Liquibase migration at startup (using the same datasource and OTEL driver as the rest of the app), the sampler is apparently not set yet, hence the warning.

Expected behavior

No warning from OTEL extension, even if using "startup time features" such as the liquibase extension.

Actual behavior

Warning logged

How to Reproduce?

liquibase-quickstart-with-otel.zip

mvn quarkus:dev

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.15.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

LateBoundBatchSpanProcessor issues a similar warning (if otlp export is not disabled).

Of course it doesn't make much sense to trace liquibase JDBC operations, but simply using the regular app datasource is the default setup for simple cases.

@famod famod added the kind/bug Something isn't working label Dec 20, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 20, 2022

/cc @andrejpetras(liquibase), @geoand(liquibase), @gsmet(liquibase)

@famod
Copy link
Member Author

famod commented Dec 20, 2022

I think this has more to do with tracing, cc @brunobat @radcortez

@famod famod changed the title OTel LateBoundSampler logs warning if using Liquibase and SQL instrumentation OTel LateBoundSampler logs warning if using Liquibase and JDBC instrumentation Dec 20, 2022
@brunobat
Copy link
Contributor

Hi @famod can you please provide a reproducer?

@famod
Copy link
Member Author

famod commented Dec 21, 2022

Hi @brunobat, I added a reproducer. AFAICS, this issue is not specific to dev mode, but it was the fastest way to reproduce.

The reproducer is basically identical to the official liquibase quickstart, only with two added OTel deps and two additional config settings.

@brunobat
Copy link
Contributor

Thanks very much @famod

@geoand
Copy link
Contributor

geoand commented Jul 5, 2023

In more recent versions of Quarkus, the warning is always displayed when OpenTelemetry is used (regardless of what other extension or configuration are used).

I am looking into a fix

@geoand geoand self-assigned this Jul 5, 2023
geoand added a commit to geoand/quarkus that referenced this issue Jul 5, 2023
This is now done entirely in a CDI producer method
which is then fully initialized when OpenTelemetry
autoconfigures itself

Fixes: quarkusio#29987
@geoand
Copy link
Contributor

geoand commented Jul 5, 2023

Here it is.

geoand added a commit to geoand/quarkus that referenced this issue Jul 5, 2023
This is now done entirely in a CDI producer method
which is then fully initialized when OpenTelemetry
autoconfigures itself

Fixes: quarkusio#29987
geoand added a commit to geoand/quarkus that referenced this issue Jul 18, 2023
This is now done entirely in a CDI producer method which is then fully initialized when OpenTelemetry autoconfigures itself

Fixes: quarkusio#29987 (which with newer Quarkus versions is even more problematic)
geoand added a commit to geoand/quarkus that referenced this issue Jul 18, 2023
This is now done entirely in a CDI producer method which is then fully initialized when OpenTelemetry autoconfigures itself

Fixes: quarkusio#29987 (which with newer Quarkus versions is even more problematic)
geoand added a commit that referenced this issue Jul 19, 2023
Properly construct instance of LateBoundBatchSpanProcessor
@quarkus-bot quarkus-bot bot added this to the 3.3 - main milestone Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants