Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[contrib-aws] Check for presence of @metadata element in Aws\Result object before accessing within mapResult instrumentation hook. #301

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

gwharton
Copy link
Contributor

@gwharton gwharton commented Oct 3, 2024

Added check to Instrumentation mapResult hook to check for presence of @metadata element in the Aws\Result object, as @metadata is not always set for all instrumented functions.

fixes open-telemetry/opentelemetry-php#1390

…@metadata element in the Aws\Result object, as @metadata is not always set for all instrumented functions.
@gwharton gwharton requested a review from a team as a code owner October 3, 2024 09:18
Copy link

welcome bot commented Oct 3, 2024

Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one.

Copy link

linux-foundation-easycla bot commented Oct 3, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

Copy link
Collaborator

@bobstrecansky bobstrecansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this bug fix!

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.33%. Comparing base (c06f8c6) to head (ba00256).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Aws/src/AwsSdkInstrumentation.php 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #301      +/-   ##
============================================
- Coverage     80.35%   80.33%   -0.02%     
- Complexity     1025     1026       +1     
============================================
  Files            98       98              
  Lines          4112     4113       +1     
============================================
  Hits           3304     3304              
- Misses          808      809       +1     
Flag Coverage Δ
Aws 85.51% <0.00%> (-0.24%) ⬇️
Context/Swoole 0.00% <ø> (ø)
Instrumentation/CakePHP 20.00% <ø> (ø)
Instrumentation/CodeIgniter 73.94% <ø> (ø)
Instrumentation/ExtAmqp 89.58% <ø> (ø)
Instrumentation/Guzzle 69.73% <ø> (ø)
Instrumentation/HttpAsyncClient 81.33% <ø> (ø)
Instrumentation/IO 70.90% <ø> (ø)
Instrumentation/MongoDB 77.33% <ø> (ø)
Instrumentation/OpenAIPHP 86.82% <ø> (ø)
Instrumentation/PDO 89.56% <ø> (ø)
Instrumentation/Psr14 78.12% <ø> (ø)
Instrumentation/Psr15 93.50% <ø> (ø)
Instrumentation/Psr16 97.50% <ø> (ø)
Instrumentation/Psr18 82.08% <ø> (ø)
Instrumentation/Psr3 60.25% <ø> (ø)
Instrumentation/Psr6 97.61% <ø> (ø)
Instrumentation/Slim 86.95% <ø> (ø)
Instrumentation/Symfony 89.03% <ø> (ø)
Instrumentation/Yii 77.77% <ø> (ø)
Logs/Monolog 100.00% <ø> (ø)
Propagation/ServerTiming 100.00% <ø> (ø)
Propagation/TraceResponse 100.00% <ø> (ø)
ResourceDetectors/Container 93.02% <ø> (ø)
Sampler/RuleBased 32.14% <ø> (ø)
Shims/OpenTracing 92.99% <ø> (ø)
Symfony 88.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Aws/src/AwsSdkInstrumentation.php 48.07% <0.00%> (-0.95%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c06f8c6...ba00256. Read the comment docs.

@brettmc brettmc merged commit 3a66cc8 into open-telemetry:main Oct 4, 2024
109 of 120 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants