Skip to content

[OpAMP] Remote config -> effective config feedback#2898

Closed
robsunday wants to merge 28 commits into
signalfx:mainfrom
robsunday:opamp-remote-effective-config-feedback
Closed

[OpAMP] Remote config -> effective config feedback#2898
robsunday wants to merge 28 commits into
signalfx:mainfrom
robsunday:opamp-remote-effective-config-feedback

Conversation

@robsunday

Copy link
Copy Markdown
Contributor

No description provided.

breedx-splk and others added 27 commits June 10, 2026 16:00
# Conflicts:
#	opamp/src/main/java/com/splunk/opentelemetry/opamp/OpampActivator.java
#	opamp/src/main/java/com/splunk/opentelemetry/opamp/RemoteConfigProcessor.java
#	opamp/src/main/java/com/splunk/opentelemetry/opamp/ServerToAgentMessageHandler.java
#	opamp/src/test/java/com/splunk/opentelemetry/opamp/RemoteConfigProcessorTest.java
#	profiler/src/main/java/com/splunk/opentelemetry/profiler/JfrAgentListener.java
#	profiler/src/main/java/com/splunk/opentelemetry/profiler/PeriodicRecordingFlusher.java
Sending effective config when configuration changed
import java.time.Duration;

public interface ProfilerConfiguration {
OptionalConfigurableSupplier<ProfilerConfiguration> SUPPLIER =

@robsunday robsunday Jun 24, 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.

[for reviewer] Now both implementations of ProfilerConfiguration interface are accessible through the same SUPPLIER. Depending on configuration flavor - SUPPLIER will serve appropriate type of configuration. Before this refactoring ProfilerEnvVarsConfiguration was created in multiple places. Now it is instantiated only once, which is OK since ConfigProperties is immutable after SDK is initialized. It was necessary to support profiler remote config in a uniform way.

DeclarativeConfigurationCustomizerProvider.class,
AutoConfigurationCustomizerProvider.class
})
public class ProfilerConfigurationInitializer

@robsunday robsunday Jun 24, 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.

[for reviewer] This class supports environment and declarative configuration. Appropriate method is called to init SUPPLIER with right profiler configuration kind, depending on agent configuration flavor used.

import opamp.proto.AgentConfigFile;
import opamp.proto.AgentConfigMap;

public class EffectiveConfigReporter {

@robsunday robsunday Jun 24, 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.

[for reviewer] This class keeps recently reported effective config and reports a new effective config only if the content changed.
Maybe it is not the most effective way of handling effective config reporting but it is a good start. I'm open to any improvement ideas.

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] This class is a proxy over original configuration. Original profiler configuration is immutable once created. This class overwrites handling of the properties that are updatable via remote configuration, while preserving original values.
I'm still considering introducing a mutable ProfilerConfiguration interface implementation and letting appropriate factories to set it up. This would be served via SUPPLIER without any proxy objects.

@robsunday robsunday closed this Jun 25, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 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