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.
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
Add details about extracting topic name in the SNS publish API #421
Changes from 1 commit
a219569
8d2ab9e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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".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.
I'm no expert here, but I don't think accesspoints for SNS are a thing. AFAICT there are:
arn:aws:s3:region:account-id:accesspoint/access-point-name/object/resource
(per https://docs.amazonaws.cn/en_us/AmazonS3/latest/userguide/using-access-points.html)^arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:access-point/fsap-[0-9a-f]{8,40}$
(per https://docs.aws.amazon.com/efs/latest/ug/API_CreateAccessPoint.html#API_CreateAccessPoint_ResponseSyntax)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 comment
The reason will be displayed to describe this comment to others. Learn more.
A possible alternative section for
span.name
, which also addresses a cardinality issue that I think exists forTargetArn
usage (i.e. sending to mobile devices):Raw spec text:
Rendered spec text:
span.name
: (SNS Publish API reference)TopicArn
, the span name MUST beSNS PUBLISH $topicName
. For example, for a TopicArn ofarn:aws:sns:us-east-2:123456789012:My-Topic
the topicName isMy-Topic
. (Implementation note: this can extracted with the equivalent of this Python expression:topicArn.split(':').pop()
.)TargetArn
(an endpoint ARN created via CreatePlatformEndpoint), the span name MUST beSNS PUBLISH $applicationName
. For example, for a TargetArn ofarn:aws:sns:us-west-2:123456789012:endpoint/GCM/gcmpushapp/5e3e9847-3183-3f18-a7e8-671c3a57d4b3
the applicationName isendpoint/GCM/gcmpushapp
. The endpoint UUID represents a device and mobile app. For manageable cardinality, the UUID must be excluded from the span name. (Implementation note: this can be extracted with the equivalent of this Python expression:targetArn.split(':').pop().rsplit('/', 1)[0]
)PhoneNumber
, the span name MUST beSNS PUBLISH <PHONE_NUMBER>
. The actual phone number MUST NOT be included because it is PII and cardinality is too high.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.
Thoughts on
[PhoneNumber]
or[PHONENUMBER]
instead of<PHONE_NUMBER>
?[REDACTED]
as a replacement value elsewhere -- i.e. with square brackets.PhoneNumber
matches the API doc parameter 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.
The cardinality issues apply to
context.destination.service.resource
as well.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 today, there were no objections to the proposed text above. Eyal expressed a slight preference for
[PHONENUMBER]
(all caps) for the placeholder string. I'll add a new PR comment here with a proposed diff.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.
(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 comment
The reason will be displayed to describe this comment to others. Learn more.