Repository navigation
Breaking - Split host id resource detector into swo_uams and swo_k8s - #645
Merged
Merged
Conversation
… drop host.id and mac.addresses
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The partial-configuration test assumes no detected Kubernetes metadata and can fail depending on the host environment.
1 open issue
What changed in this PR
Separates SolarWinds resource detection into focused OpenTelemetry providers with explicit YAML configuration.
Changes:
- Introduces
swo_apm,swo_uams, andswo_k8sdetectors. - Separates UAMS and Kubernetes attributes and removes automatic detector injection.
- Updates configuration examples and provider tests.
| File | Description |
|---|---|
| smoke-tests/sdk-config.yaml | Enables the three detectors. |
| sdk-config.yaml | Updates example detector configuration. |
| libs/shared/src/test/resources/sdk-config.yaml | Configures detectors for shared tests. |
| custom/src/test/resources/sdk-config.yaml | Configures detectors for custom tests. |
| custom/src/test/resources/sdk-config-bad.yaml | Updates the invalid-config fixture. |
| custom/src/test/java/com/solarwinds/opentelemetry/extensions/provider/ApmResourceComponentProviderTest.java | Updates APM provider naming assertions. |
| custom/src/test/java/com/solarwinds/opentelemetry/extensions/config/provider/UamsResourceComponentProviderTest.java | Updates UAMS provider naming assertions. |
| custom/src/test/java/com/solarwinds/opentelemetry/extensions/config/provider/K8sResourceComponentProviderTest.java | Tests Kubernetes configuration overrides. |
| custom/src/test/java/com/solarwinds/opentelemetry/extensions/config/provider/CustomConfigCustomizerProviderTest.java | Removes automatic-injection tests. |
| custom/src/test/java/com/solarwinds/opentelemetry/extensions/config/HostIdResourceUtilTest.java | Tests separated attribute mappings. |
| custom/src/main/java/com/solarwinds/opentelemetry/extensions/ResourceArbiter.java | Removes the resource arbiter. |
| custom/src/main/java/com/solarwinds/opentelemetry/extensions/config/provider/UamsResourceComponentProvider.java | Limits detection to UAMS attributes. |
| custom/src/main/java/com/solarwinds/opentelemetry/extensions/config/provider/K8sResourceComponentProvider.java | Adds Kubernetes detection and overrides. |
| custom/src/main/java/com/solarwinds/opentelemetry/extensions/config/provider/CustomConfigCustomizerProvider.java | Removes automatic detector injection. |
| custom/src/main/java/com/solarwinds/opentelemetry/extensions/config/provider/ApmResourceComponentProvider.java | Renames the provider and removes shared state. |
| custom/src/main/java/com/solarwinds/opentelemetry/extensions/config/HostIdResourceUtil.java | Separates UAMS and Kubernetes attribute creation. |
Review effort: Balanced
jerrytfleung
approved these changes
Oct 19, 2026
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.

This pull request refactors and modularizes the resource detection and attribute creation logic for OpenTelemetry extensions, with a focus on improving clarity, separation of concerns, and testability. The changes split resource providers into more focused components, update attribute creation utilities, and revise tests to match the new structure.
Key changes include:
Resource Provider Refactoring
ResourceComponentProviderinto three distinct providers:ApmResourceComponentProvider,UamsResourceComponentProvider, and a newK8sResourceComponentProvider, each responsible for a specific set of resource attributes. This improves modularity and maintainability. [1] [2] [3]ResourceArbiterandCustomConfigCustomizerProviderclasses, as their responsibilities have been replaced by the new provider structure. [1] [2]Attribute Utility Improvements
HostIdResourceUtilto provide separate methods for creating UAMS and Kubernetes attributes, ensuring that each attribute set is cleanly separated and only contains relevant keys. The maincreateAttribute()method now combines these as needed. [1] [2]Test Updates
HostIdResourceUtilTestto validate the new attribute creation methods, ensuring that only the intended keys are present in each attribute set and that mappings from metadata are correct.CustomConfigCustomizerProviderTestsince the customization logic has been replaced by the new provider classes.Naming and Consistency
swo_apm,swo_uams,swo_k8s) for clarity and alignment with their respective responsibilities. [1] [2] [3]References:
[1] [2] [3] [4] [5] [6] [7] [8] [9]
Test services data