Skip to content

[OpAMP] Dedicated module and full effective config reported for env vars#2766

Merged
robsunday merged 9 commits intosignalfx:mainfrom
robsunday:opamp-effective-config-new-module
Apr 17, 2026
Merged

[OpAMP] Dedicated module and full effective config reported for env vars#2766
robsunday merged 9 commits intosignalfx:mainfrom
robsunday:opamp-effective-config-new-module

Conversation

@robsunday
Copy link
Copy Markdown
Contributor

@robsunday robsunday commented Apr 16, 2026

This is first attempt to report complete set of env vars used to configure the agent. This set is based on content of https://help.splunk.com/en/splunk-observability-cloud/manage-data/available-data-sources/supported-integrations-in-splunk-observability-cloud/apm-instrumentation/instrument-a-java-application/configure-the-java-agent with some minor discrepancies fixed.

There are still some open questions so for sure next PRs will come.
In this PR EnvVarsEffectiveConfigFileFactory replicates some pieces of configuration logic mostly from profiler and snapshot profiler configurations.
This logic is usually used to create a default value if some property is not provided. We need to decide how we want to handle it.

This PR also introduces dedicated module for OpAMP support which isolates OpAMP related code and also solves circular dependency issue that occurred when attempting to call profiler configuration code from :custom module.

@robsunday robsunday requested review from a team as code owners April 16, 2026 11:33
Sensitive data is masked. not removed
.add("otel.instrumentation.jdbc.experimental.capture-query-parameters", false)
.add("otel.instrumentation.jdbc.experimental.sqlcommenter.enabled", false)
.add("otel.instrumentation.jdbc.experimental.transaction.enabled", false)
.add("otel.instrumentation.jdbc.statement-sanitizer.enabled", true)
Copy link
Copy Markdown
Collaborator

@laurit laurit Apr 16, 2026

Choose a reason for hiding this comment

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

some of these have complex defaults like jdbc sanitizer defaults to the value of common.db-statement-sanitizer which probably makes accurately reporting this too hard

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. In some cases there is some logic behind default value calculation. Thankfully sometimes we have it wrapped already in methods than we just can call, like methods from ProfilerEnvVarsConfiguration. At some point we will have to discuss general approach to complex defaults

Copy link
Copy Markdown
Collaborator

@laurit laurit Apr 17, 2026

Choose a reason for hiding this comment

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

I personally think that it is futile. Might try to handle some well know values like otlp exporters and splunk specific properties but for rest might as well extract all keys that start with otel or otel.instrumenation from the config properties and send them as they are.

@laurit
Copy link
Copy Markdown
Collaborator

laurit commented Apr 16, 2026

This set is based on content of https://help.splunk.com/en/splunk-observability-cloud/manage-data/available-data-sources/supported-integrations-in-splunk-observability-cloud/apm-instrumentation/instrument-a-java-application/configure-the-java-agent with some minor discrepancies fixed.

that page is generated from the metadata we provide which unfortunately is not completely up to date

@robsunday
Copy link
Copy Markdown
Contributor Author

that page is generated from the metadata we provide which unfortunately is not completely up to date

Do we have any reliable source of truth for this? Anyway, the docs need to be reviewed and updated.

@robsunday robsunday merged commit a5ce0e8 into signalfx:main Apr 17, 2026
30 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2026
@laurit
Copy link
Copy Markdown
Collaborator

laurit commented Apr 17, 2026

Do we have any reliable source of truth for this? Anyway, the docs need to be reviewed and updated.

I'm working on this.

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