From f13b339a91da59c0585648bb305174df7734d28a Mon Sep 17 00:00:00 2001 From: "(Eliseo) Nathaniel Ruiz Nowell" Date: Tue, 19 Oct 2021 03:18:58 -0400 Subject: [PATCH] Check Request ID format on S3 call (#750) --- .../opentelemetry-instrumentation-botocore/setup.cfg | 2 +- .../tests/test_botocore_instrumentation.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-botocore/setup.cfg b/instrumentation/opentelemetry-instrumentation-botocore/setup.cfg index 566d726ce..e107867e7 100644 --- a/instrumentation/opentelemetry-instrumentation-botocore/setup.cfg +++ b/instrumentation/opentelemetry-instrumentation-botocore/setup.cfg @@ -45,7 +45,7 @@ install_requires = [options.extras_require] test = - moto[all] ~= 2.0 + moto[all] ~= 2.2.6 opentelemetry-test == 0.25b1 [options.packages.find] diff --git a/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_instrumentation.py b/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_instrumentation.py index 0d8d61295..5ee04c610 100644 --- a/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_instrumentation.py +++ b/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_instrumentation.py @@ -178,15 +178,17 @@ class TestBotocoreInstrumentor(TestBase): location = {"LocationConstraint": "us-west-2"} s3.create_bucket(Bucket="mybucket", CreateBucketConfiguration=location) - self.assert_span("S3", "CreateBucket") + self.assert_span( + "S3", "CreateBucket", request_id=_REQUEST_ID_REGEX_MATCH + ) self.memory_exporter.clear() s3.put_object(Key="foo", Bucket="mybucket", Body=b"bar") - self.assert_span("S3", "PutObject") + self.assert_span("S3", "PutObject", request_id=_REQUEST_ID_REGEX_MATCH) self.memory_exporter.clear() s3.get_object(Bucket="mybucket", Key="foo") - self.assert_span("S3", "GetObject") + self.assert_span("S3", "GetObject", request_id=_REQUEST_ID_REGEX_MATCH) @mock_sqs def test_sqs_client(self):