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

pyramid: Only categorize 400s and 500s exceptions as errors #1136

Merged
merged 3 commits into from
Jun 16, 2022

Conversation

nstawski
Copy link
Contributor

@nstawski nstawski commented Jun 15, 2022

Description

Pyramid instrumentation was categorizing all HTTPExceptions including 300s (redirects) and some 200s (for example, 204 No Content) as errors. This pull request updates this functionality to only categorize HTTPErrors as errors. List of exceptions in Pyramid

Fixes #1037

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added tests to check that redirect and no content exceptions are not categorized as errors to pyramid-redirect-error-fix/instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added

@nstawski nstawski requested a review from a team as a code owner June 15, 2022 20:49
@ocelotl ocelotl merged commit 4ba6214 into open-telemetry:main Jun 16, 2022
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.

Ignore exception attributes for a given route or status (Pyramid)
3 participants