Repository navigation
NH-150778: Bump OTel agent to 2.32.0 and SDK to 1.66.0 - #635
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The newly introduced null-list handling lacks direct regression coverage in both customizers.
2 open findings
What changed in this PR
Upgrades OpenTelemetry dependencies and migrates declarative configuration customizers to the SDK 1.66 model API.
Changes:
- Bumps the agent to 2.32.0 and SDK to 1.66.0.
- Migrates extension properties, experimental accessors, and null-list handling.
- Updates tests and renames the HTTP settings thread.
| File | Description |
|---|---|
dependencyManagement/build.gradle.kts |
Updates OpenTelemetry versions. |
SharedConfigCustomizerProvider.java |
Migrates shared configuration customization. |
SharedConfigCustomizerProviderTest.java |
Ports and expands shared customizer tests. |
SolarwindsConfigResolverTest.java |
Updates resolver model construction. |
CustomConfigCustomizerProvider.java |
Migrates resource and processor customization. |
CustomConfigCustomizerProviderTest.java |
Tests resource detector preservation. |
DeclarativeLoaderTest.java |
Ports declarative loader tests. |
HttpSettingsFetcher.java |
Renames the polling thread. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TL;DR
Upgrades the OpenTelemetry Java agent (2.31.1 → 2.32.0) and SDK (1.65.0 → 1.66.0), and migrates our declarative-config customizers to the reworked model API in SDK 1.66. No behavior change is intended; the config we inject (resource detectors, processors, sampler, exporters, propagators) is the same.
Why code changes were needed
SDK 1.66 changed the generated declarative-config model classes in ways that break the old customizer code:
withX(...)mutators are nowsetX(...), and they returnthiswhere chaining is used. All customizers were updated accordingly.*PropertyModelwrappers are gone. Extension components (sampler, span/metric/log exporters, span processors, distribution) now take a plainMap<String, Object>throughsetExtensionProperty(name, map)and are read back viagetExtensionProperties(). Components with no options use an emptyHashMap.instrumentation/developmentnode are reached through the internalResourceModelAccessorandOpenTelemetryConfigurationModelAccessorhelpers instead ofgetDetectionDevelopment()/withInstrumentationDevelopment().null. Getters such asgetProcessors()andgetReaders()no longer return an empty list by default. Each place that copies or streams these lists now null-guards first; otherwise a config with an omittedprocessors:orreaders:key would NPE during customization.Notable implementation details
properties(Object... keyValues)helper builds an insertion-orderedLinkedHashMapfor exporter options. It replaces long chains ofwithAdditionalPropertycalls and keeps the generated property order deterministic.stacktrace/developmentvalue is now an untyped object, so it is copied defensively into a new map (only if it is aMap). Ourfilteris added only when the user has not set one. A user-defined filter always wins.MeterProviderModelis updated viasetReadersrather than replaced, so any other settings on it (for example views) are preserved.addProcessorsin the custom module is null-safe for the same reason as the shared module.Tests
setX, map-based extension properties, accessor helpers).DeclarativeLoaderTestgetsmodel(...)/distribution(...)helpers to build models without repeating the accessor plumbing.verifyThatExistingResourceDetectorsArePreservedAfterOurs, which checks that a user-defined detector survives and ours come first.Test services data