-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support for SNS #1
Comments
Thanks for the feedback. Will take a look at what SNS requires. Can you share what x-ray sdks you are using (Java, JavaScript ...) so we can prioritize. |
We using .net but I was thinking that because you using traces you would be agnostic to runtime. |
You are correct We are agnostic to the runtime. Thing is, that the x-ray sdks don't report accessed resources by default for all services (for example SNS is not yet supported). This is controlled via a whitelist file in the sdk. Will take a look to see what .net supports and if it can be configured. |
Just did a commit and published a new version to npm with support for SNS. Note that the x-ray .net sdk doesn't support sending the topic arn as part of SNS segment traces. There is need to configure a parameter whitelist for SNS. I am providing here instructions based upon my experience with other sdks. I didn't get a chance to actually test this out yet on the .net sdk. You will need to copy the file: https://github.com/aws/aws-xray-sdk-dotnet/blob/master/sdk/src/Handlers/AwsSdk/DefaultAWSWhitelist.json and then add to it the following json section under "SimpleNotificationService": {
"operations": {
"AddPermission": {
"request_parameters": [
"TopicArn"
]
},
"ConfirmSubscription": {
"request_parameters": [
"TopicArn"
]
},
"CreatePlatformApplication": {
"request_parameters": [
"Name",
"Platform"
]
},
"CreatePlatformEndpoint": {
"request_parameters": [
"PlatformApplicationArn"
]
},
"CreateTopic": {
"request_parameters": [
"Name"
]
},
"DeletePlatformApplication": {
"request_parameters": [
"PlatformApplicationArn"
]
},
"DeleteTopic": {
"request_parameters": [
"TopicArn"
]
},
"GetPlatformApplicationAttributes": {
"request_parameters": [
"PlatformApplicationArn"
]
},
"GetSubscriptionAttributes": {
"request_parameters": [
"SubscriptionArn"
]
},
"GetTopicAttributes": {
"request_parameters": [
"TopicArn"
]
},
"ListEndpointsByPlatformApplication": {
"request_parameters": [
"PlatformApplicationArn"
]
},
"ListSubscriptionsByTopic": {
"request_parameters": [
"TopicArn"
]
},
"Publish": {
"request_parameters": [
"TopicArn",
"TargetArn"
]
},
"RemovePermission": {
"request_parameters": [
"TopicArn"
]
},
"SetPlatformApplicationAttributes": {
"request_parameters": [
"PlatformApplicationArn"
]
},
"SetSubscriptionAttributes": {
"request_parameters": [
"SubscriptionArn"
]
},
"SetTopicAttributes": {
"request_parameters": [
"TopicArn"
]
},
"Subscribe": {
"request_parameters": [
"TopicArn",
"Protocol",
"Endpoint"
]
},
"Unsubscribe": {
"request_parameters": [
"SubscriptionArn"
]
}
}
}
} The configuration for SNS is copied from: https://github.com/functionalone/aws-xray-parameter-whitelist-node/blob/master/resources/sns_whitelist.json with the change to the service name and capitalization of the operation name. I can add a js script which can generate this if you think this is useful. After you created the extended whitelist file configuration you will need to configure the x-ray sdk to use this file. This seems to be controlled via the configuration parameter: |
Wanted to say thank you for the feature. |
Great tool, we tried it and it looks like it working as advertised, we would love to have support for SNS as well.
The text was updated successfully, but these errors were encountered: