soto-project / soto-core

Core framework of Soto the Swift SDK for AWS
https://soto.codes
Apache License 2.0
111 stars 51 forks source link

Tracing middleware #575

Closed adam-fowler closed 1 year ago

adam-fowler commented 1 year ago

Middleware that adds span with basic tracing attributes. This does not add the V2 attributes as it seems V3 has ditched them. I haven't added the S3 and DynamoDB attributes yet as I haven't found a way to do this cleanly which I'm happy with.

This will need a rebuild of the services as I have added a new parameter to ServiceConfig which is the service name which differs slightly from the service identifier.

@slashmo

Ditched the previous PR as it was merging to the wrong branch

codecov[bot] commented 1 year ago

Codecov Report

Merging #575 (22d904a) into 7.x.x (3d5720c) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            7.x.x     #575      +/-   ##
==========================================
+ Coverage   79.09%   79.11%   +0.01%     
==========================================
  Files          77       78       +1     
  Lines        6506     6512       +6     
==========================================
+ Hits         5146     5152       +6     
  Misses       1360     1360              
Files Changed Coverage Δ
Sources/SotoCore/AWSClient.swift 91.93% <100.00%> (ø)
Sources/SotoCore/AWSServiceConfig.swift 92.15% <100.00%> (-0.87%) :arrow_down:
Sources/SotoCore/Credential/STSAssumeRole.swift 92.72% <100.00%> (+0.13%) :arrow_up:
...Core/Middleware/Middleware/TracingMiddleware.swift 100.00% <100.00%> (ø)
Sources/SotoTestUtils/TestUtils.swift 84.84% <100.00%> (+0.23%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more