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 Annotations Source Retention #631

Merged
merged 4 commits into from
Jul 1, 2024
Merged

Conversation

SentryMan
Copy link
Collaborator

@SentryMan SentryMan commented Jun 27, 2024

Change annotations to have Class retention with the exception of:

  • @Component
  • @PreDestroy
  • @PostConstruct

The reason for these exceptions is that for APM (Application Performance Monitoring) tools like avaje-metrics detect and enhance with timing all public methods of all @Component / @Singleton. Lifecycle methods annotated with @PreDestroy/ @PostConstruct typically get excluded by default from APM so we need to detect those as well.

Note that if projects need some of these annotations to have RUNTIME or CLASS retention then please log an issue with the use case that you need to support - thanks.

@SentryMan SentryMan enabled auto-merge June 27, 2024 20:57
@SentryMan SentryMan self-assigned this Jun 27, 2024
@SentryMan SentryMan added the enhancement New feature or request label Jun 27, 2024
@rob-bygrave
Copy link
Contributor

Some of these annotations are used for APM - Application Performance Monitoring. For example, they are detected by avaje-metrics to enhance which can timing metrics to all public methods of all @Component, @Singleton etc and typically excluding @PostConstruct. So no, we can't make them all SOURCE retention.

@SentryMan SentryMan closed this Jul 1, 2024
auto-merge was automatically disabled July 1, 2024 12:04

Pull request was closed

@rbygrave
Copy link
Contributor

rbygrave commented Jul 1, 2024

We can re-open this, I can go through and change the ones we want to keep at RUNTIME. I'll reopen for now.

@rbygrave rbygrave reopened this Jul 1, 2024
@rob-bygrave rob-bygrave merged commit 8efdc38 into avaje:master Jul 1, 2024
7 checks passed
@SentryMan SentryMan deleted the retention branch July 2, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants