Repository: aws/aws-xray-sdk-python

Issue:
Add SNS Service "Publish" operation to the aws_para_whitelist
Currently the SNS publish operation shows up with a minimum set of metadata:
```
"aws": {
    "operation": "Publish",
    "region": "us-east-1",
    "request_id": "a939cee1-7c48-5675-b385-9ae2206dc121"
}
```

This should include at least the known internal AWS resources like `TopicArn` or `TargetArn` and maybe even the `PhoneNumber`.

Discussion:
Tankanow: Hi @haotianw465, what is the status of this PR? Do you need any action from me?
haotianw465: No. Thank you for your contribution. I'm merging this change and will prepare a release soon.

Patch:
diff --git a/aws_xray_sdk/ext/resources/aws_para_whitelist.json b/aws_xray_sdk/ext/resources/aws_para_whitelist.json
index bc6642a..3a89b2e 100644
--- a/aws_xray_sdk/ext/resources/aws_para_whitelist.json
+++ b/aws_xray_sdk/ext/resources/aws_para_whitelist.json
@@ -1,5 +1,14 @@
 {
   "services": {
+    "sns": {
+      "operations": {
+        "Publish": {
+          "request_parameters": [
+            "TopicArn"
+          ]
+        }
+      }
+    },
     "dynamodb": {
       "operations": {
         "BatchGetItem": {


Test patch:
diff --git a/tests/ext/botocore/test_botocore.py b/tests/ext/botocore/test_botocore.py
index 8d48785..f006de2 100644
--- a/tests/ext/botocore/test_botocore.py
+++ b/tests/ext/botocore/test_botocore.py
@@ -150,3 +150,26 @@ def test_pass_through_on_context_missing():
     assert result is not None
 
     xray_recorder.configure(context_missing='RUNTIME_ERROR')
+
+
+def test_sns_publish_parameters():
+    sns = session.create_client('sns', region_name='us-west-2')
+    response = {
+        'ResponseMetadata': {
+            'RequestId': REQUEST_ID,
+            'HTTPStatusCode': 200,
+        }
+    }
+
+    with Stubber(sns) as stubber:
+        stubber.add_response('publish', response, {'TopicArn': 'myAmazingTopic', 'Message': 'myBodaciousMessage'})
+        sns.publish(TopicArn='myAmazingTopic', Message='myBodaciousMessage')
+
+    subsegment = xray_recorder.current_segment().subsegments[0]
+    assert subsegment.http['response']['status'] == 200
+
+    aws_meta = subsegment.aws
+    assert aws_meta['topic_arn'] == 'myAmazingTopic'
+    assert aws_meta['request_id'] == REQUEST_ID
+    assert aws_meta['region'] == 'us-west-2'
+    assert aws_meta['operation'] == 'Publish'