-
Notifications
You must be signed in to change notification settings - Fork 342
Update EventBridge DSM topic naming #11603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gh-worker-dd-mergequeue-cf854d
merged 7 commits into
master
from
james.eastham/dsm-event-bridge
Jul 1, 2026
+101
−4
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
88fb9c6
Update EventBridge DSM topic naming
jeastham1993 15b84bb
Align EventBridge DSM tags with exchange/topic format
jeastham1993 ad40fa8
Merge branch 'master' into james.eastham/dsm-event-bridge
jeastham1993 2f4e2bb
Merge branch 'master' into james.eastham/dsm-event-bridge
jeastham1993 0a84bd3
Merge branch 'master' into james.eastham/dsm-event-bridge
jeastham1993 d6e8822
Fix EventBridge test formatting
jeastham1993 e4167ed
Merge branch 'master' into james.eastham/dsm-event-bridge
jeastham1993 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
51 changes: 51 additions & 0 deletions
51
...est/java/datadog/trace/instrumentation/aws/v2/eventbridge/EventBridgeInterceptorTest.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package datadog.trace.instrumentation.aws.v2.eventbridge; | ||
|
|
||
| import static org.junit.jupiter.api.Assertions.assertEquals; | ||
| import static org.junit.jupiter.api.Assertions.assertNull; | ||
|
|
||
| import datadog.trace.api.datastreams.DataStreamsTags; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| class EventBridgeInterceptorTest { | ||
|
|
||
| @Test | ||
| void buildsDataStreamsTagsFromArnAndDetailType() { | ||
| DataStreamsTags tags = | ||
| EventBridgeInterceptor.buildDataStreamsTags( | ||
| "arn:aws:events:us-east-1:123456789012:event-bus/test-bus", "order.created"); | ||
|
|
||
| assertEquals(DataStreamsTags.DIRECTION_TAG + ":out", tags.getDirection()); | ||
| assertEquals(DataStreamsTags.EXCHANGE_TAG + ":test-bus", tags.getExchange()); | ||
| assertEquals(DataStreamsTags.TOPIC_TAG + ":order.created", tags.getTopic()); | ||
| assertEquals(DataStreamsTags.TYPE_TAG + ":eventbridge", tags.getType()); | ||
| } | ||
|
|
||
| @Test | ||
| void keepsPartnerBusPathWhenNormalizingArn() { | ||
| DataStreamsTags tags = | ||
| EventBridgeInterceptor.buildDataStreamsTags( | ||
| "arn:aws:events:us-east-1:123456789012:event-bus/aws.partner/example.com/acct/bus-name", | ||
| "detail-type"); | ||
|
|
||
| assertEquals( | ||
| DataStreamsTags.EXCHANGE_TAG + ":aws.partner/example.com/acct/bus-name", | ||
| tags.getExchange()); | ||
| assertEquals(DataStreamsTags.TOPIC_TAG + ":detail-type", tags.getTopic()); | ||
| } | ||
|
|
||
| @Test | ||
| void defaultsToTheDefaultEventBusNameWhenMissing() { | ||
| DataStreamsTags tags = EventBridgeInterceptor.buildDataStreamsTags(null, "detail-type"); | ||
|
|
||
| assertEquals(DataStreamsTags.EXCHANGE_TAG + ":default", tags.getExchange()); | ||
| assertEquals(DataStreamsTags.TOPIC_TAG + ":detail-type", tags.getTopic()); | ||
| } | ||
|
|
||
| @Test | ||
| void omitsTheTopicTagWhenDetailTypeIsMissing() { | ||
| DataStreamsTags tags = EventBridgeInterceptor.buildDataStreamsTags("test-bus", null); | ||
|
|
||
| assertEquals(DataStreamsTags.EXCHANGE_TAG + ":test-bus", tags.getExchange()); | ||
| assertNull(tags.getTopic()); | ||
| } | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This module only adds Spock/Groovy to
testImplementationand puts the JUnit 5 bundle ontestRuntimeOnlyin the shared Gradle setup, so this new Java test has no compile-time dependency fororg.junit.jupiter.api.*. In this module,compileTestJavawill fail as soon as it tries to compile this file unless the module adds a JUnit Jupiter API/implementation dependency or the test is written using the existing compile-time test dependencies.Useful? React with 👍 / 👎.