Skip to content

Conversation

maziyarbahramian
Copy link
Contributor

@maziyarbahramian maziyarbahramian commented Sep 3, 2025

This PR addresses #47025.

As discussed in #46166, the current name @ConditionalOnEnabledTracing is misleading since it only controls tracing export, not all tracing-related beans.

This PR renames it to @ConditionalOnEnabledTracingExport to better reflect its purpose. All related references have been updated accordingly.

Changes

  • Rename @ConditionalOnEnabledTracing to @ConditionalOnEnabledTracingExport
  • Rename global property from management.tracing.enabled to management.tracing.export.enabled
  • Update additional-spring-configuration-metadata.json accordingly
  • Rename OnEnabledTracingCondition to OnEnabledTracingExportCondition

@nosan
Copy link
Contributor

nosan commented Sep 3, 2025

I think, in addition to renaming the annotation, it is also worth renaming the global property from
"management.tracing.enabled" to "management.tracing.export.enabled". This would be similar to OnEnabledLoggingExportCondition. This also requires updating additional-spring-configuration-metadata.json

Also, OnEnabledTracingCondition should be renamed to OnEnabledTracingExportCondition.

@maziyarbahramian
Copy link
Contributor Author

@nosan Thanks for the feedback! I’ll go ahead and make the suggested changes

@maziyarbahramian maziyarbahramian changed the title Rename ConditionalOnEnabledTracing to ConditionalOnEnabledTracingExport Refactor tracing annotation and export condition Sep 3, 2025
@wilkinsona
Copy link
Member

@nosan, thank you for helping out here. Can you please make it clear to contributors, particularly when you're suggesting changes that go beyond the initial scope of an issue, that you aren't a member of the core team? Hopefully no wasted effort in this case (WDYT, @mhalbritter?), but I'd like to avoid the possibility in the future so that a contributor can choose to wait for a member of the core team to +1 a suggestion before they spend time on it.

@nosan
Copy link
Contributor

nosan commented Sep 4, 2025

... that you aren't a member of the core team?

Agreed.

...when you're suggesting changes that go beyond the initial scope of an issue,...

IMO, I don't think they go beyond the initial scope of the issue. This will help maintain consistency between export logging and tracing.


In any case, I should have waited for approval from a core team member before suggesting any changes in that direction.

Copy link
Contributor

@mhalbritter mhalbritter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I just have one minor comment.

@mhalbritter mhalbritter changed the title Refactor tracing annotation and export condition Rename ConditionalOnEnabledTracing to ConditionalOnEnabledTracingExport Sep 4, 2025
@mhalbritter mhalbritter added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 4, 2025
@mhalbritter mhalbritter self-assigned this Sep 4, 2025
@mhalbritter mhalbritter added this to the 4.0.x milestone Sep 4, 2025
- Rename @ConditionalOnEnabledTracing to @ConditionalOnEnabledTracingExport
- Rename global property from management.tracing.enabled to management.tracing.export.enabled
- Update additional-spring-configuration-metadata.json accordingly
- Rename OnEnabledTracingCondition to OnEnabledTracingExportCondition

Signed-off-by: Maziyar Bahramian <maziyar.bahramian@gmail.com>
mhalbritter pushed a commit that referenced this pull request Sep 5, 2025
See gh-47029

Signed-off-by: Maziyar Bahramian <maziyar.bahramian@gmail.com>
@mhalbritter
Copy link
Contributor

Thanks @maziyarbahramian !

@mhalbritter
Copy link
Contributor

And thanks @nosan for review!

@mhalbritter mhalbritter modified the milestones: 4.0.x, 4.0.0-M3 Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants