Skip to content

Commit

Permalink
remove outdated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter committed Aug 29, 2024
1 parent 0661e09 commit 4b8e008
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/datadog-plugin-aws-sdk/src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BaseAwsSdkPlugin extends ClientPlugin {
return this._tracerConfig.cloudPayloadTagging
}

get payloadTaggingRules () { // never runs
get payloadTaggingRules () {
return this.cloudTaggingConfig.rules.aws?.[this.constructor.id]
}

Expand Down
6 changes: 0 additions & 6 deletions packages/datadog-plugin-aws-sdk/test/sns.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,11 @@ describe('Sns', function () {

describe('with payload tagging', () => {
before(async () => {
// There's some bug when running tests in CI where the agent needs to be loaded and closed first
// without it the first test run fails
await agent.load('aws-sdk')
await agent.close({ ritmReset: false, wipe: true })
await agent.load('aws-sdk', {}, {
cloudPayloadTagging: {
// request: ['$.MessageAttributes.foo', '$.MessageAttributes.redacted.StringValue.foo'],
request: '$.MessageAttributes.foo,$.MessageAttributes.redacted.StringValue.foo',
// response: ['$.MessageId', '$.Attributes.DisplayName'],
response: '$.MessageId,$.Attributes.DisplayName',
maxDepth: 5
}
Expand Down Expand Up @@ -299,15 +295,13 @@ describe('Sns', function () {
agent.use(traces => {
const span = traces[0][0]

// expect(span.resource).to.equal('publish') // typo?
expect(span.resource).to.equal(`confirmSubscription ${TopicArn}`)
expect(span.meta).to.include({
aws_service: 'SNS',
'aws.sns.topic_arn': TopicArn,
topicname: 'TestTopic',
region: 'us-east-1',
'aws.request.body.Token': 'redacted',
// 'aws.request.body.TopicArn': 'TestTopic' // typo?
'aws.request.body.TopicArn': TopicArn
})
}).then(done, done)
Expand Down
4 changes: 2 additions & 2 deletions packages/dd-trace/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ class Config {

const DD_TRACE_CLOUD_REQUEST_PAYLOAD_TAGGING = splitJSONPathRules(
coalesce(
process.env.DD_TRACE_CLOUD_REQUEST_PAYLOAD_TAGGING, // string
options.cloudPayloadTagging?.request, // array
process.env.DD_TRACE_CLOUD_REQUEST_PAYLOAD_TAGGING,
options.cloudPayloadTagging?.request,
''
))

Expand Down

0 comments on commit 4b8e008

Please sign in to comment.