mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-01 06:33:52 +08:00
Check Request ID format on S3 call (#750)
This commit is contained in:

committed by
GitHub

parent
9e57fbad8e
commit
f13b339a91
@ -45,7 +45,7 @@ install_requires =
|
|||||||
|
|
||||||
[options.extras_require]
|
[options.extras_require]
|
||||||
test =
|
test =
|
||||||
moto[all] ~= 2.0
|
moto[all] ~= 2.2.6
|
||||||
opentelemetry-test == 0.25b1
|
opentelemetry-test == 0.25b1
|
||||||
|
|
||||||
[options.packages.find]
|
[options.packages.find]
|
||||||
|
@ -178,15 +178,17 @@ class TestBotocoreInstrumentor(TestBase):
|
|||||||
|
|
||||||
location = {"LocationConstraint": "us-west-2"}
|
location = {"LocationConstraint": "us-west-2"}
|
||||||
s3.create_bucket(Bucket="mybucket", CreateBucketConfiguration=location)
|
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()
|
self.memory_exporter.clear()
|
||||||
|
|
||||||
s3.put_object(Key="foo", Bucket="mybucket", Body=b"bar")
|
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()
|
self.memory_exporter.clear()
|
||||||
|
|
||||||
s3.get_object(Bucket="mybucket", Key="foo")
|
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
|
@mock_sqs
|
||||||
def test_sqs_client(self):
|
def test_sqs_client(self):
|
||||||
|
Reference in New Issue
Block a user