Skip to content

[OpAMP] Sending updated effective config after remote config is applied#2904

Merged
robsunday merged 10 commits into
signalfx:mainfrom
robsunday:remote-cfg-to-effective-cfg-feedback
Jun 29, 2026
Merged

[OpAMP] Sending updated effective config after remote config is applied#2904
robsunday merged 10 commits into
signalfx:mainfrom
robsunday:remote-cfg-to-effective-cfg-feedback

Conversation

@robsunday

@robsunday robsunday commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Effective config is now reported if profiler configuration changed.

Test improved
# Conflicts:
#	opamp/src/main/java/com/splunk/opentelemetry/opamp/RemoteConfigProcessor.java
#	opamp/src/main/java/com/splunk/opentelemetry/opamp/effectiveconfig/EnvVarsEffectiveConfigFileFactory.java
return new EffectiveConfigReporter(createEffectiveConfigFactory(sdk), effectiveConfigState);
}

public boolean reportEffectiveConfigIfChanged() {

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] It is the most basic approach, but is good enough for now. Effective config is recreated every time and compared with the one most recently reported. If identical then it is not sent again.


ProfilerConfiguration updatedProfilerConfig =
ProfilerConfiguration.SUPPLIER.get().toBuilder()
.setEnabled(receivedProfilerConfig.isEnabled())

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] Next configurable properties will go here

.build();
ProfilerConfiguration.SUPPLIER.configure(updatedProfilerConfig);

if (updatedProfilerConfig.isEnabled()) {

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] It will change in next PR, so other properties can be supported

@robsunday robsunday marked this pull request as ready for review June 25, 2026 14:45
@robsunday robsunday requested review from a team as code owners June 25, 2026 14:45
@mergify

mergify Bot commented Jun 25, 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


public void set(AgentConfigMap configMap) {
agentConfigMap = configMap;
notifyUpdate();

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] Automatically trigger sending message to the server with this state.

@robsunday robsunday changed the title [OpAMP] Effective config feedback after remote config applied [OpAMP] Sending effective config updated after remote config is applied Jun 26, 2026
@robsunday robsunday changed the title [OpAMP] Sending effective config updated after remote config is applied [OpAMP] Sending updated effective config after remote config is applied Jun 26, 2026
.last_remote_config_hash(remoteConfig.config_hash)
.status(RemoteConfigStatuses.RemoteConfigStatuses_APPLIED)
.build());
// TODO: Maybe should be postponed after profiler is enabled/disabled?

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.

todo

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.

Right, will be done in one of the following PRs

@robsunday robsunday merged commit b3b93e6 into signalfx:main Jun 29, 2026
30 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
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.

2 participants