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

Make @Traced inherited #188

Open
ggam opened this issue Mar 21, 2020 · 3 comments
Open

Make @Traced inherited #188

ggam opened this issue Mar 21, 2020 · 3 comments

Comments

@ggam
Copy link

ggam commented Mar 21, 2020

Excuse me if this has been already discussed.

I usually create a CDI stereotype which ressembles the @Stateless EJB annotation and can be used on all business classes:

@Stereotype
@Retention(RUNTIME)
@Target(TYPE)
@RequestScoped
public @interface Service {
}

I'd like to add the @Traced annotation to it in order to get automatic OpenTracing support, but sadly the annotations isn't inherited, so it doesn't work.

Did you have any reason not to make @Traced inheritable? I can provide a PR for it if you think it's a good idea. In the meantime, I'll simulate the behaviour with a CDI extension adding the annotation to the all beans that use my stereotype.

@pavolloffay
Copy link
Contributor

This hasn't been discussed. I am not familiar with this concept. @pilhuhn or @fmhwong could you please loop in?

@fmhwong
Copy link
Contributor

fmhwong commented Mar 24, 2020

Did you mean adding @Traced in the following

@Stereotype
@Retention(RUNTIME)
@Target(TYPE)
@RequestScoped
@Traced
public @interface Service {
}


public class ThingOne {

    @Service
    public void someService() {
        // do something
    } 

}

and someService() is not traced.

@ggam
Copy link
Author

ggam commented Mar 24, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants