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/go-chi: Apply DD_TRACE_HTTP_SERVER_ERROR_STATUSES #2960

Merged
merged 7 commits into from
Nov 6, 2024

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented Nov 1, 2024

What does this PR do?

Removes isServerError function from go-chi and go-chi.v5 integrations. In the case that the contribs have not been initialized with a custom error checker via WithStatusError, they will rely on the error checker from httptrace.
This allows go-chi and go-chi.v5 integrations to be impacted by DD_TRACE_HTTP_SERVER_ERROR_STATUSES.

Motivation

Noticed the Test_Config_HttpServerErrorStatuses_FeatureFlagCustom system test was failing for go-chi (link)

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Nov 1, 2024
contrib/internal/httptrace/config.go Outdated Show resolved Hide resolved
@mtoffl01 mtoffl01 marked this pull request as ready for review November 4, 2024 17:17
@mtoffl01 mtoffl01 requested review from a team as code owners November 4, 2024 17:17
@mtoffl01 mtoffl01 requested a review from darccio November 4, 2024 17:17
@pr-commenter
Copy link

pr-commenter bot commented Nov 4, 2024

Benchmarks

Benchmark execution time: 2024-11-05 16:29:20

Comparing candidate commit 2cdd6a9 in PR branch mtoff/fix-chi-errors with baseline commit c9fc691 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 0 unstable metrics.

@mtoffl01 mtoffl01 merged commit 5dd43b0 into main Nov 6, 2024
150 checks passed
@mtoffl01 mtoffl01 deleted the mtoff/fix-chi-errors branch November 6, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants