Repository navigation
Add swo_stacktrace declarative config component - #654
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The root configuration lacks the replacement component, so removing automatic insertion disables its previously enabled database stacktrace capture.
1 open issue
What changed in this PR
Moves declarative stacktrace configuration into a dedicated swo_stacktrace component within the shared OpenTelemetry extensions.
Changes:
- Adds a component provider with configurable filter attributes and a default
db.systemfilter. - Removes the legacy YAML filter parser and automatic stacktrace processor injection.
- Migrates smoke-test configuration and updates unit tests for explicit component configuration.
| File | Description |
|---|---|
smoke-tests/sdk-config.yaml |
Uses swo_stacktrace with explicit filters. |
libs/shared/src/test/resources/sdk-config.yaml |
Removes legacy filter configuration. |
libs/shared/src/test/resources/sdk-config-bad-transaction-settings-1.yaml |
Removes legacy filter configuration. |
libs/shared/src/test/resources/sdk-config-bad-transaction-settings-0.yaml |
Removes legacy filter configuration. |
libs/shared/src/test/java/com/solarwinds/opentelemetry/extensions/SpanStacktraceFilterTest.java |
Tests explicit filters alongside the database default. |
libs/shared/src/test/java/com/solarwinds/opentelemetry/extensions/config/provider/StacktraceComponentProviderTest.java |
Tests duration thresholds, filtering, and custom predicates. |
libs/shared/src/test/java/com/solarwinds/opentelemetry/extensions/config/provider/SharedConfigCustomizerProviderTest.java |
Updates processor expectations and removes injection tests. |
libs/shared/src/test/java/com/solarwinds/opentelemetry/extensions/config/parser/yaml/StacktraceFilterParserTest.java |
Deletes obsolete parser tests. |
libs/shared/src/main/java/com/solarwinds/opentelemetry/extensions/SpanStacktraceFilter.java |
Adds explicit filter construction with the database default. |
libs/shared/src/main/java/com/solarwinds/opentelemetry/extensions/config/provider/StacktraceComponentProvider.java |
Registers and creates the new stacktrace component. |
libs/shared/src/main/java/com/solarwinds/opentelemetry/extensions/config/provider/SharedConfigCustomizerProvider.java |
Removes automatic stacktrace processor injection. |
libs/shared/src/main/java/com/solarwinds/opentelemetry/extensions/config/parser/yaml/StacktraceFilterParser.java |
Deletes the legacy YAML filter parser. |
Review effort: Balanced
…stacktrace filters
cleverchuk
force-pushed
the
cc/NH-152835
branch
from
October 27, 2026 15:10
dfb9ed7 to
c31edc6
Compare
|
@cleverchuk Can you also document this apm-java specific component to declarative spec too? Thanks! |
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 the way stacktrace filtering is configured and integrated into the OpenTelemetry extensions. It removes the YAML-based
StacktraceFilterParserin favor of a new component provider approach, simplifies processor injection, and updates related tests. The changes aim to streamline configuration, improve extensibility, and ensure the default filter behavior is consistent.Key changes:
Stacktrace Filter Configuration and Integration
Introduced
StacktraceComponentProviderfor stacktrace filtering:Added a new
StacktraceComponentProviderclass that acts as a drop-in replacement for the previous stacktrace processor injection. It defaults to usingSpanStacktraceFilterand allows configuring filter attributes, always includingdb.systemby default. This replaces the previous YAML parser and processor customization logic.Removed YAML-based
StacktraceFilterParserand its test:Deleted the
StacktraceFilterParserclass and its corresponding test, eliminating the old way of parsing stacktrace filter configuration from YAML files. [1] [2]Simplification of Processor Injection
SharedConfigCustomizerProvider:The logic that injected or updated the experimental stacktrace processor (
stacktrace/development) inSharedConfigCustomizerProviderwas removed, as this is now handled by the new component provider. Associated imports and helper methods were also cleaned up. [1] [2] [3] [4]SpanStacktraceFilter Improvements
SpanStacktraceFilterto support explicit filters with default:Updated
SpanStacktraceFilterto accept an explicit collection of filter attributes, always includingdb.systemas a default, and added a test to validate this behavior. [1] [2] [3]Test Updates
Adjusted tests in
SharedConfigCustomizerProviderTestto expect only one processor (not two), and removed tests that depended on the old stacktrace processor injection logic. [1] [2] [3] [4]Test services data