Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Jan 6, 2026

No description provided.

@trask trask changed the title Limit early agent config to specific list of properties Support reading early agent config from declarative config yaml Jan 6, 2026
@trask trask marked this pull request as ready for review January 6, 2026 04:28
@trask trask requested a review from a team as a code owner January 6, 2026 04:28

public static EarlyInitAgentConfig create() {
if (DeclarativeConfigurationFile.isConfigured()) {
return new EarlyInitAgentConfig(DeclarativeConfigurationFile.getProperties());
Copy link
Member

Choose a reason for hiding this comment

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

This would involve Jackson too early and cause class loading issues - I think polluting the wrong class loader.
@laurit explained that to me when I tried to do that last year.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

link doesn't work:

  private static OpenTelemetryConfigurationModel loadConfigurationModel(String configurationFile) {
    try (FileInputStream fis = new FileInputStream(configurationFile)) {
      return DeclarativeConfiguration.parse(fis);
    } catch (IOException e) {
      ErrorBuffer.addErrorMessage(
          "Error reading configuration file: " + configurationFile + ". " + e.getMessage());
      return null;
    }
  }

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yes, I'll have to think on this some more

@trask trask marked this pull request as draft January 7, 2026 04:34
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