Skip to content

New - declarative config parity and deprecated monitor.* config removal#465

Merged
cleverchuk merged 1 commit intomainfrom
cc/NH-132405
Apr 20, 2026
Merged

New - declarative config parity and deprecated monitor.* config removal#465
cleverchuk merged 1 commit intomainfrom
cc/NH-132405

Conversation

@cleverchuk
Copy link
Copy Markdown
Contributor

Summary

Aligns the declarative configuration customizers with the principle that user-provided YAML config is authoritative. Instead of creating default provider models (TracerProvider, LoggerProvider, Propagator) when absent, the customizers now only configure signals that the user explicitly declared. Also removes the defunct JMX monitoring config properties and their references throughout the codebase.

Changes

Respect user-declared signal providers

  • SharedConfigCustomizerProvider no longer creates TracerProviderModel or LoggerProviderModel when they are absent from the config. Sampler, span processors, span exporters, and log exporters are only added when their respective provider is declared by the user.
  • CustomConfigCustomizerProvider similarly guards processor injection behind a null check on TracerProviderModel.
  • When MeterProviderModel is absent, a default is still created (metrics pipeline requires it), but AGENT_EXPORT_METRICS_ENABLED is set to false so no metric data is exported without explicit opt-in.

Propagator handling made additive

  • If the user already declares a PropagatorModel with a compositeList, the SolarWinds propagator is appended rather than replacing the list. A new default list is only set when no propagator config exists.

New YAML config parsers

  • TriggerTraceParser — reads agent.triggerTrace (boolean, defaults to true).
  • SqlQueryMaxLengthParser — reads agent.sqlQueryMaxLength (integer, range-validated against existing constants).

Remove defunct JMX monitoring config

  • Removed MONITOR_* config properties (JMX_SCOPES, JMX_ENABLE, JMX_MAX_ENTRY, METRICS_FLUSH_INTERVAL, SPAN_METRICS_ENABLE) and the MONITOR config group.
  • Cleaned up all references in lambda config, smoke-test config, and test YAML fixtures.
  • Added YAML key for AGENT_LOG_FILE (agent.javaLogFile).
  • UrlSampleRateConfigParser no longer skips null TraceConfig entries — the null guard was unnecessary.

Test coverage

  • Added tests for absent-provider scenarios (tracesNotConfiguredWhenTracerProviderAbsent, logsNotConfiguredWhenLoggerProviderAbsent, metricsExportDisabledWhenMeterProviderAbsent, propagatorsAppendedToExistingCompositeList, processorsNotAddedWhenTracerProviderAbsent).
  • Added unit tests for both new parsers.
  • Updated existing tests to explicitly provide the provider models they depend on.

Test services data

  1. e-1712644058766987264
  2. e-1712643928659124224
  3. e-1742334541200846848
  4. e-1777406072376840192

@cleverchuk cleverchuk requested review from a team as code owners April 16, 2026 19:46
Copilot AI review requested due to automatic review settings April 16, 2026 19:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Aligns SolarWinds declarative-config customizers with the “user YAML is authoritative” principle by only injecting trace/log pipeline defaults when the corresponding providers are explicitly declared, while also removing deprecated monitor.* (JMX) configuration remnants and adding a couple of new YAML-backed agent settings.

Changes:

  • Guard trace/log processor/exporter/sampler injection behind presence of TracerProviderModel / LoggerProviderModel; keep metrics pipeline viable via default MeterProviderModel but disable export by default when absent.
  • Make propagator handling additive (append SolarWinds propagator to an existing composite list rather than replacing it).
  • Add YAML config parsers for agent.triggerTrace and agent.sqlQueryMaxLength, and remove deprecated monitor.* config properties/fixtures.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
smoke-tests/apm-config.json Removes deprecated monitor.jmx.* keys from smoke-test config.
sdk-config.yaml Updates guidance comment for disabling log export via YAML.
libs/shared/src/test/resources/sdk-config.yaml Updates test fixture YAML: removes monitor.*, adds new agent keys.
libs/shared/src/test/java/.../SharedConfigCustomizerProviderTest.java Updates existing tests to explicitly declare providers; adds absent-provider coverage.
libs/shared/src/test/java/.../TriggerTraceParserTest.java Adds unit tests for agent.triggerTrace parser behavior/defaults.
libs/shared/src/test/java/.../SqlQueryMaxLengthParserTest.java Adds unit tests for agent.sqlQueryMaxLength parsing + range validation.
libs/shared/src/main/java/.../SharedConfigCustomizerProvider.java Implements provider-presence guards; additive propagators; disables metrics export when meter provider is absent.
libs/shared/src/main/java/.../UrlSampleRateConfigParser.java Simplifies URL sample-rate parsing by removing an unnecessary null guard.
libs/shared/src/main/java/.../TriggerTraceParser.java New YAML parser for agent.triggerTrace (default true).
libs/shared/src/main/java/.../SqlQueryMaxLengthParser.java New YAML parser for agent.sqlQueryMaxLength with range validation.
libs/config/src/main/java/.../ConfigProperty.java Adds YAML key for AGENT_LOG_FILE; removes deprecated MONITOR_* properties.
libs/config/src/main/java/.../ConfigGroup.java Removes defunct MONITOR config group.
custom/src/test/java/.../CustomConfigCustomizerProviderTest.java Updates tests for new “don’t create tracer provider” behavior; adds absent-provider test.
custom/src/main/java/.../CustomConfigCustomizerProvider.java Guards processor injection behind TracerProviderModel presence.
agent-lambda/script/solarwinds-apm-config.json Removes deprecated monitor.jmx.enable from lambda config.

Copy link
Copy Markdown

@jerrytfleung jerrytfleung left a comment

Choose a reason for hiding this comment

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

LGTM

@cleverchuk cleverchuk merged commit 6e1a9a7 into main Apr 20, 2026
32 of 33 checks passed
@cleverchuk cleverchuk deleted the cc/NH-132405 branch April 20, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants