-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add details about extracting topic name in the SNS publish API #421
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -22,7 +22,7 @@ themselves organized into regions. | |||||
- **`context.destination.service.name`**: mandatory. Use `s3` | ||||||
- **`context.destination.service.resource`**: optional. The bucket name, if available. The s3 API allows either the | ||||||
bucket name or an Access Point to be provided when referring to a bucket. Access Points can use either slashes or colons. | ||||||
When an Access Point is provided, the access point name preceded by `accesspoint/` or `accesspoint:` should be extracted. | ||||||
When an Access Point is provided, the Access Point name preceded by `accesspoint/` or `accesspoint:` should be extracted. | ||||||
For example, given an Access Point such as `arn:aws:s3:us-west-2:123456789012:accesspoint/myendpointslashes`, the agent | ||||||
extracts `accesspoint/myendpointslashes`. Given an Access Point such as | ||||||
`arn:aws:s3:us-west-2:123456789012:accesspoint:myendpointcolons`, the agent extracts `accesspoint:myendpointcolons`. | ||||||
|
@@ -53,10 +53,16 @@ For distributed tracing, the SQS API has "message attributes" that can be used i | |||||
### SNS (AWS Simple Notification Service) | ||||||
|
||||||
The AWS Simple Notification Service can be instrumented using the [messaging spec](tracing-instrumentation-messaging.md), | ||||||
but the only action that is instrumented is `PUBLISH`. These specifications supersede those of the messaging spec: | ||||||
but the only action that is instrumented is [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html). These specifications supersede those of the messaging spec: | ||||||
|
||||||
- `span.name`: The span name should follow this pattern: `SNS PUBLISH <TOPIC-NAME>`. For example, | ||||||
`SNS PUBLISH MyTopic`. | ||||||
`SNS PUBLISH MyTopic`. The publish API allows a topic to be specified as a topic arn, target arn, or phone number. | ||||||
If the topic is a phone number, do not put the phone number in the span name. The span name should instead be | ||||||
`SNS PUBLISH <PHONE_NUMBER>`. For target and topic arns that are Access Points, use the Access Point name preceded by | ||||||
`accesspoint/` or `accesspoint:`. So a target/topic arn specified as | ||||||
`arn:aws:s3:us-west-2:123456789012:accesspoint/myendpointslashes`, the agent extracts `accesspoint/myendpointslashes` as | ||||||
the topic name. Given an Access Point such as `arn:aws:s3:us-west-2:123456789012:accesspoint:myendpointcolons`, | ||||||
the agent extracts `accesspoint:myendpointcolons` as the topic name. | ||||||
Comment on lines
+61
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm no expert here, but I don't think accesspoints for SNS are a thing. AFAICT there are:
Neither of these are usable with SNS Publish (https://docs.aws.amazon.com/sns/latest/api/API_Publish.html), as far as I can tell. Does anyone have an example or a reference that shows access point ARNs are relevant for SNS Publish? If not, I think we should remove mention of them here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A possible alternative section for Raw spec text:
Rendered spec text:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thoughts on
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The cardinality issues apply to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From team discussion today, there were no objections to the proposed text above. Eyal expressed a slight preference for
Comment on lines
58
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (GitHub PRs don't allow a suggested diff over a deleted line.) Suggested replacement:
|
||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- **`context.destination.cloud.region`**: mandatory. The AWS region where the topic is. | ||||||
|
||||||
|
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.
As long as we maintain consistency with the messaging spec, should the name be:
SNS PUBLISH to <TOPIC-NAME>
?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.
https://github.com/elastic/apm/blob/master/specs/agents/tracing-instrumentation-messaging.md#naming says the name should be
<MSG-FRAMEWORK> SEND/RECEIVE/POLL to/from <QUEUE-NAME>
, so should the name here beSNS SEND to <TOPIC-NAME>
?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.
From team discussion earlier today it was decided to use
SNS PUBLISH to <TOPIC-NAME>
(withspan.action = 'publish'
). According to #446, Ruby is already doing this. Go doesn't have the " to".