Skip to content

[File based config] Cleanup of customizers that can be replaced by YAML snippets#2496

Merged
robsunday merged 7 commits intosignalfx:mainfrom
robsunday:fbc-cleanup
Nov 6, 2025
Merged

[File based config] Cleanup of customizers that can be replaced by YAML snippets#2496
robsunday merged 7 commits intosignalfx:mainfrom
robsunday:fbc-cleanup

Conversation

@robsunday
Copy link
Copy Markdown
Contributor

As we agreed - amount of custom code must be minimized.
This PR removes some customization code that is no longer needed and should be replaced by YAML templates/snippets

@robsunday robsunday requested review from a team as code owners October 24, 2025 16:18
Copy link
Copy Markdown
Contributor Author

@robsunday robsunday Oct 24, 2025

Choose a reason for hiding this comment

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

[for reviewer] This file may be added back in one of subsequent PRs if it is needed for profiler.

import java.util.logging.Logger;

@AutoService(DeclarativeConfigurationCustomizerProvider.class)
public class WebengineSpanProcessorCustomizerProvider
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure we want to remove this. @breedx-splk wdyt?

Copy link
Copy Markdown
Contributor Author

@robsunday robsunday Oct 28, 2025

Choose a reason for hiding this comment

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

I also had doubts, but since it can be replaced with maximum 3 lines in YAML (see YAML snippets doc I'm working on) I decided to remove it.
But if you think it is worth keeping I'l' revert it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In my opinion this boils down to whether we wish to have this opt-in or opt-out. If a feature is opt-in then having user configure it in the yaml is fine. If it is opt-out then it should be enabled by default, unless user specifically disables it in yaml. Imo you should discuss it with Andrzej.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It makes sense. @breedx-splk - what is your opinion on this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In my opinion this boils down to whether we wish to have this opt-in or opt-out. If a feature is opt-in then having user configure it in the yaml is fine. If it is opt-out then it should be enabled by default, unless user specifically disables it in yaml. Imo you should discuss it with Andrzej.

I agree with this completely, and I think this is what we should be doing for declarative config. We could possibly revise this approach in the future, if we are providing or generating configs for users, but even then it's a bit risky for things that we really do want to be enabled or otherwise turned on by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's keep it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reverted this file and then I realized that currently there is no way to opt out from using WebengineSpanProcessor...
Maybe I should remove it again? Alternatively I could add some property under .instrumentation/development.java yaml node, but it doesn't look right to me.
What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At the end of the day, we just need a way for users to have the webengine span processor active in our distro. If they can't turn it off today, then fine, it needs to remain active even when using declarative config. We use autoconfigure to hook into that today, and because declarative config bypasses autoconfig, we'll need a way to enable that span processor.

Copy link
Copy Markdown
Contributor Author

@robsunday robsunday Nov 5, 2025

Choose a reason for hiding this comment

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

OK, so it'll stay then.

Comment on lines -97 to -99
addAdditionalPropertyIfAbsent(properties, "otel.instrumentation.spring-batch.enabled", true);
addAdditionalPropertyIfAbsent(
properties, "otel.instrumentation.spring-batch.item.enabled", true);
Copy link
Copy Markdown
Contributor Author

@robsunday robsunday Nov 3, 2025

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but these should be treated as opt-out, and I should revive them, right?

@robsunday robsunday merged commit 4df3be0 into signalfx:main Nov 6, 2025
28 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants