Skip to content

SnapshotProfilingConfiguration refactoring to be consistent with ProfilerConfiguration#2931

Open
robsunday wants to merge 4 commits into
signalfx:mainfrom
robsunday:opamp-snapshot-profiler-config-refactor
Open

SnapshotProfilingConfiguration refactoring to be consistent with ProfilerConfiguration#2931
robsunday wants to merge 4 commits into
signalfx:mainfrom
robsunday:opamp-snapshot-profiler-config-refactor

Conversation

@robsunday

@robsunday robsunday commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This PR was created to make handling of SnapshotProfilingConfiguration consistent with handling of ProfilerConfiguration (see #2903)

In scope:

  • SnapshotProfilingEnvVarsConfiguration and SnapshotProfilingDeclarativeConfiguration are replaced by a single class - SnapshotProfilingConfiguration
  • SnapshotProfilingConfiguration is created by a factory appropriate for the agent configuration flavor (SnapshotProfilingEnvVarsConfigurationFactory / SnapshotProfilingDeclarativeConfigurationFactory).
  • After creation, SnapshotProfilingConfiguration is always available through ProfilerConfiguration.SUPPLIER
  • additional refactorings needed because configuration is no longer created multiple times
  • additional refactorings needed to correctly create default profiler exporter

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.

[for reviewer] Changes in this file are needed to correctly create default profiler exporter

@robsunday robsunday marked this pull request as ready for review July 7, 2026 15:39
@robsunday robsunday requested review from a team as code owners July 7, 2026 15:39
@mergify

mergify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@breedx-splk

Copy link
Copy Markdown
Contributor

Every declarative config related PR is 1000+ lines. 😮‍💨


private Builder() {}

private Builder(SnapshotProfilingConfiguration config) {

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.

the builder takes a config and the config takes a builder? what's this world coming to?

@robsunday robsunday Jul 8, 2026

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.

Yeah, the world is changing and we have a new candidate to blame - a.i. ;-)
I fixed this circularity also in ProfilerConfiguration.

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

Successfully merging this pull request may close these issues.

2 participants