Skip to content

connect opamp to dynamic config#656

Merged
jackshirazi merged 3 commits intoelastic:mainfrom
jackshirazi:connect-opamp-dynamic-config
May 30, 2025
Merged

connect opamp to dynamic config#656
jackshirazi merged 3 commits intoelastic:mainfrom
jackshirazi:connect-opamp-dynamic-config

Conversation

@jackshirazi
Copy link
Contributor

Mainly adding and activating a new CentralConfig class, plus a little refactoring to align method names to option names. No test of the CentralConfig class in this PR, I'll do that in a followup. This is almost the last PR in the sequence to get central config working and integrated to dynamic config, the only thing left is that test and some additional work around property/env var names for the new functionality

JonasKunz
JonasKunz previously approved these changes May 28, 2025
if (!startOpAmp) {
return;
}
String serviceName = getServiceName(properties);
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't take service names derived from ResourceProviders into account, will it?
If not, we should probably add a TODO here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will if the resource provider sets the resource "service.name" entry before this executes (which should be the case) - is there another case that needs handling? I'm not sure about whether the resource providers can set it elsewhere

Copy link
Contributor

Choose a reason for hiding this comment

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

I was asking because getServiceName(properties) only reads from the ConfigurationProperties and not potential changes from ResourceProviders which don't write those, but directly set the Resource, e.g. AppServiceNameProvider.

But maybe there is some magic behind the curtains making this work? So if you tested it this is fine, otherwise we should add a TODO

@jackshirazi jackshirazi merged commit c4a1f4d into elastic:main May 30, 2025
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants