Skip to content

Commit f13b339

Browse files
authored
Check Request ID format on S3 call (#750)
1 parent 9e57fba commit f13b339

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

instrumentation/opentelemetry-instrumentation-botocore/setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ install_requires =
4545

4646
[options.extras_require]
4747
test =
48-
moto[all] ~= 2.0
48+
moto[all] ~= 2.2.6
4949
opentelemetry-test == 0.25b1
5050

5151
[options.packages.find]

instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_instrumentation.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,17 @@ def test_s3_put(self):
178178

179179
location = {"LocationConstraint": "us-west-2"}
180180
s3.create_bucket(Bucket="mybucket", CreateBucketConfiguration=location)
181-
self.assert_span("S3", "CreateBucket")
181+
self.assert_span(
182+
"S3", "CreateBucket", request_id=_REQUEST_ID_REGEX_MATCH
183+
)
182184
self.memory_exporter.clear()
183185

184186
s3.put_object(Key="foo", Bucket="mybucket", Body=b"bar")
185-
self.assert_span("S3", "PutObject")
187+
self.assert_span("S3", "PutObject", request_id=_REQUEST_ID_REGEX_MATCH)
186188
self.memory_exporter.clear()
187189

188190
s3.get_object(Bucket="mybucket", Key="foo")
189-
self.assert_span("S3", "GetObject")
191+
self.assert_span("S3", "GetObject", request_id=_REQUEST_ID_REGEX_MATCH)
190192

191193
@mock_sqs
192194
def test_sqs_client(self):

0 commit comments

Comments
 (0)