New Relic Node.js agent code base. Developers are welcome to create pull requests here, please see our contributing guidelines. For New Relic technical support, please go to http://support.newrelic.com.
Apache License 2.0
966
stars
395
forks
source link
Add new span attributes to SQS calls to facilitate entity relationships #2377
I don't think these should go into the common attributes here but instead add an after hook to parse the QueueUrl and add the relevant span attributes described above.
Description
We need to add new span attributes so the cloud monitoring team can link SQS calls from Node.js app to AWS SQS:
Linking between APM and SQS entities is done using the following span attributes:
messaging.system
- should be the stringaws_sqs
cloud.region
- the AWS region the queue is in. eg. us-east-2cloud.account.id
- the AWS' account id. eg. 123456789012messaging.destination.name
- the name of the queue. eg. MyQueuecloud.region
,cloud.account.id
, andmessaging.destination.name
can be derived from the queue URL. The queue URL follow the format:https://sqs.{region}.amazonaws.com/{account.id}/{queue.name}
.Additional context
I don't think these should go into the common attributes here but instead add an after hook to parse the QueueUrl and add the relevant span attributes described above.