@@ -97,6 +97,7 @@ def test_botocore_instrumentation(instrument, elasticapm_client):
97
97
assert span ["type" ] == "aws"
98
98
assert span ["subtype" ] == "ec2"
99
99
assert span ["action" ] == "DescribeInstances"
100
+ assert span ["context" ]["http" ]["request" ]["id" ]
100
101
101
102
102
103
def test_s3 (instrument , elasticapm_client ):
@@ -117,6 +118,7 @@ def test_s3(instrument, elasticapm_client):
117
118
assert span ["context" ]["destination" ]["service" ]["name" ] == "s3"
118
119
assert span ["context" ]["destination" ]["service" ]["resource" ] == "xyz"
119
120
assert span ["context" ]["destination" ]["service" ]["type" ] == "storage"
121
+ assert span ["context" ]["http" ]["request" ]["id" ]
120
122
assert spans [0 ]["name" ] == "S3 CreateBucket xyz"
121
123
assert spans [0 ]["action" ] == "CreateBucket"
122
124
assert spans [1 ]["name" ] == "S3 PutObject xyz"
@@ -175,6 +177,7 @@ def test_dynamodb(instrument, elasticapm_client, dynamodb):
175
177
assert span ["context" ]["destination" ]["service" ]["name" ] == "dynamodb"
176
178
assert span ["context" ]["destination" ]["service" ]["resource" ] == "Movies"
177
179
assert span ["context" ]["destination" ]["service" ]["type" ] == "db"
180
+ assert span ["context" ]["http" ]["request" ]["id" ]
178
181
assert spans [0 ]["name" ] == "DynamoDB PutItem Movies"
179
182
assert spans [1 ]["name" ] == "DynamoDB Query Movies"
180
183
assert spans [1 ]["context" ]["db" ]["statement" ] == "title = :v1 and #y = :v2"
@@ -200,6 +203,7 @@ def test_sns(instrument, elasticapm_client):
200
203
assert spans [2 ]["context" ]["destination" ]["service" ]["name" ] == "sns"
201
204
assert spans [2 ]["context" ]["destination" ]["service" ]["resource" ] == "sns/mytopic"
202
205
assert spans [2 ]["context" ]["destination" ]["service" ]["type" ] == "messaging"
206
+ assert spans [2 ]["context" ]["http" ]["request" ]["id" ]
203
207
204
208
205
209
def test_sqs_send (instrument , elasticapm_client , sqs_client_and_queue ):
@@ -222,6 +226,7 @@ def test_sqs_send(instrument, elasticapm_client, sqs_client_and_queue):
222
226
assert span ["context" ]["destination" ]["service" ]["name" ] == "sqs"
223
227
assert span ["context" ]["destination" ]["service" ]["resource" ] == "sqs/myqueue"
224
228
assert span ["context" ]["destination" ]["service" ]["type" ] == "messaging"
229
+ assert span ["context" ]["http" ]["request" ]["id" ]
225
230
226
231
messages = sqs .receive_message (
227
232
QueueUrl = queue_url ,
0 commit comments