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

Yii2 instrumentation - fix http.route for non-InlineAction #234

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

agoallikmaa
Copy link
Contributor

Resolves open-telemetry/opentelemetry-php#1228

The previous method of detecting http.route only worked correctly if the action was an InlineAction (which is the case for controller methods), but if it was provided in another way, it would throw and route would fallback to HTTP method. Using id field of base Action class if action is not an InlineAction to fix this.

@agoallikmaa agoallikmaa requested a review from a team February 5, 2024 00:09
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (324ecfd) 85.44% compared to head (4e2b1b7) 85.44%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #234   +/-   ##
=========================================
  Coverage     85.44%   85.44%           
- Complexity      965      966    +1     
=========================================
  Files            88       88           
  Lines          3915     3916    +1     
=========================================
+ Hits           3345     3346    +1     
  Misses          570      570           
Flag Coverage Δ
7.4 85.71% <ø> (ø)
8.0 84.58% <80.00%> (+<0.01%) ⬆️
8.1 84.69% <80.00%> (+<0.01%) ⬆️
8.2 85.36% <80.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
src/Instrumentation/Yii/src/YiiInstrumentation.php 86.59% <80.00%> (+0.13%) ⬆️

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 324ecfd...4e2b1b7. Read the comment docs.

@brettmc brettmc merged commit 5e8357b into open-telemetry:main Feb 5, 2024
76 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
Development

Successfully merging this pull request may close these issues.

[contrib-auto-yii]Getting unknown property: yii\web\ErrorAction::actionMethod
3 participants