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

Record status codes when middleware instrumentation is disabled #2175

Merged
merged 20 commits into from Aug 23, 2023

Conversation

tannalynn
Copy link
Contributor

@tannalynn tannalynn commented Aug 21, 2023

This removes the check for disable_middleware_instrumentation when recording the http status code. Previously the agent would skip recording it if the middleware instrumentation was disabled due to the possibility that a middleware not being instrumented could alter the response. However, we've decided to change this behavior due to customer feedback. Now, the status code will always be recorded to the transaction if available.

Also, I fixed an old bug in AgentHooks.needed?, the logic was inverted, prevent the agent hooks from being used at the correct time.

resolves #2149

@tannalynn tannalynn marked this pull request as ready for review August 22, 2023 20:45
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
tannalynn and others added 4 commits August 22, 2023 13:58
Co-authored-by: James Bunch <fallwith@gmail.com>
Co-authored-by: James Bunch <fallwith@gmail.com>
…ub.com:newrelic/newrelic-ruby-agent into status_code_without_middleware_instrumentation
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
lib/new_relic/agent/configuration/default_source.rb Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
tannalynn and others added 5 commits August 22, 2023 14:04
Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
hannahramadan
hannahramadan previously approved these changes Aug 22, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
@github-actions
Copy link

SimpleCov Report

Coverage Threshold
Line 94.24% 94%
Branch 85.73% 85%

@tannalynn tannalynn merged commit c058bfc into dev Aug 23, 2023
26 checks passed
@tannalynn tannalynn deleted the status_code_without_middleware_instrumentation branch August 23, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Capture http.statusCode regardless of middleware instrumentation
4 participants