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

Produced beans don't generate metrics on methods @Timed #29067

Closed
ennishol opened this issue Nov 4, 2022 · 5 comments
Closed

Produced beans don't generate metrics on methods @Timed #29067

ennishol opened this issue Nov 4, 2022 · 5 comments
Labels
area/metrics kind/bug Something isn't working triage/wontfix This will not be worked on

Comments

@ennishol
Copy link
Contributor

ennishol commented Nov 4, 2022

Describe the bug

When a produced bean has a public method annotated with @Timed, no metrics will be generated. @ApplicationScoped beans work as expected

Expected behavior

Metrics are generated for produced beans

Actual behavior

no metrics generated

How to Reproduce?

quarkus-timed-producers.tar.gz

execute tests in the attached project

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

No response

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

No response

Additional information

No response

@ennishol ennishol added the kind/bug Something isn't working label Nov 4, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 4, 2022

/cc @ebullient, @jmartisk @brunobat

@geoand
Copy link
Contributor

geoand commented Nov 4, 2022

Also cc @mkouba in case this is an Arc issue

@jmartisk
Copy link
Contributor

jmartisk commented Nov 7, 2022

Removed area/smallrye, the reproducer is using Micrometer

@jmartisk
Copy link
Contributor

jmartisk commented Nov 7, 2022

I think this use case can't work, RemoteApiSingleton is not a CDI bean at all in your application, therefore the metric interceptors don't apply. It's just a POJO returned from a producer, and you build it by calling its constructor directly. Annotated metrics only work on CDI beans.

@mkouba
Copy link
Contributor

mkouba commented Nov 7, 2022

@jmartisk is right. In CDI, interceptors are not applied to the return value of a producer method and the InterceptionFactory introduced in CDI 2.0 is not supported yet.

@mkouba mkouba closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2022
@geoand geoand added the triage/wontfix This will not be worked on label Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics kind/bug Something isn't working triage/wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants