question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opentelemetry for scheduler

See original GitHub issue

Description

I am using quarkus-scheduler and quarkus-opentelemetry. Right now, a scheduler invocation does not create a new span.

@Scheduled(every = "1s")
    void schedule() {
        Log.info(Span.current().getSpanContext().getSpanId());
    }

This outputs 2022-11-19 17:44:16,006 INFO [org.acm.Sched] (vert.x-worker-thread-0) 0000000000000000, which is an invalid span id - no span is open at that point.

Can this please be added?

Implementation ideas

No response

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Postremuscommented, Nov 21, 2022

@mkouba

which version of quarkus do you use?

2.14.1.Final

Using @WithSpan works, I get a proper SpanId (like 95d38a815ef4498c).

@syr I am not using reactive code (for now), so not too woried about that. Might come in useful though when integrating some custom (company internal) components with otel. Thank you for linking that thread.!

1reaction
mkoubacommented, Nov 21, 2022

I believe that since 2.14.0.CR1 we execute the scheduled methods using the managed thread pool (for both quarkus-scheduler and quarkus-quartz).

@Postremus which version of quarkus do you use?

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenTelemetry Integration - Quartz.NET
Open-source scheduling framework for .NET.
Read more >
Metrics - OpenTelemetry
Collected data can be used to alert of an outage or trigger scheduling decisions to scale up a deployment automatically upon high demand....
Read more >
Quartz.OpenTelemetry.Instrumentation 3.5.0 - NuGet
Quartz.OpenTelemetry.Instrumentation 3.5.0 ·.NET CLI · Package Manager · PackageReference · Paket CLI · Script & Interactive · Cake.
Read more >
OpenTelemetry best practices (overview part 2/2)
As a reminder, OpenTelemetry is an exciting new observability ecosystem with a number of ... Schedule Delay is the time between flushes.
Read more >
Request: Facility for telling Spring Scheduling instrumentation ...
I have a hack where I use an aspect over TaskScheduler.schedule*(..) to unwrap the original Runnable from a ScheduledMethodRunnable if the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found