Skip to content

feat(configuration): Mark 4xx calls as erroneous spans and adapt current instrumentations - #525

Merged
CagriYonca merged 1 commit into
masterfrom
fix-4xx-code
Sep 10, 2026
Merged

feat(configuration): Mark 4xx calls as erroneous spans and adapt current instrumentations#525
CagriYonca merged 1 commit into
masterfrom
fix-4xx-code

Conversation

@CagriYonca

@CagriYonca CagriYonca commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Adds a configurable option to mark HTTP 4xx responses as erroneous spans, and adapts the excon, net-http, and rest-client instrumentations to respect this setting.

Changes:

New http_4xx_as_error config option in config.rb
Instana::Util::Http helper for shared HTTP error classification logic
Updated excon and net-http instrumentation to use the new helper
Full test coverage across all affected instrumentations and the config/util layer

@CagriYonca
CagriYonca requested a review from a team September 3, 2026 13:46
@CagriYonca CagriYonca self-assigned this Sep 3, 2026
@CagriYonca
CagriYonca force-pushed the fix-4xx-code branch 5 times, most recently from 8caec8c to aa5a672 Compare September 3, 2026 15:27

@pvital pvital left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few requests about the project pattern and structure. The implementation itself looks good.
@arjun-rajappa, please review my comments, as well as the entire PR.

Comment thread lib/instana/config/http_exit_classification.rb Outdated
Comment thread lib/instana/config.rb Outdated
Comment thread lib/instana/config.rb Outdated
Comment thread lib/instana/config.rb Outdated
Comment thread .gitignore Outdated
Comment thread lib/instana/config/http_exit_classification.rb Outdated
Comment thread lib/instana/util/http.rb Outdated
@CagriYonca
CagriYonca force-pushed the fix-4xx-code branch 3 times, most recently from 5d6356e to 3413b73 Compare September 9, 2026 15:07
@CagriYonca
CagriYonca requested a review from pvital September 10, 2026 08:24
Comment thread test/util/http_util_test.rb Outdated
@CagriYonca
CagriYonca force-pushed the fix-4xx-code branch 2 times, most recently from 2e8fecd to d4cbb26 Compare September 10, 2026 09:31

@pvital pvital left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks good to me.

…ent instrumentations.

Signed-off-by: Cagri Yonca <cagri@ibm.com>
@sonarqubecloud

Copy link
Copy Markdown

@CagriYonca
CagriYonca merged commit a86fc77 into master Sep 10, 2026
230 of 231 checks passed
@CagriYonca
CagriYonca deleted the fix-4xx-code branch September 10, 2026 13:33
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.

3 participants