Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make record_exception more robust handling them outside the except scope #3778

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

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

xrmx
Copy link
Contributor

@xrmx xrmx commented Mar 13, 2024

Description

Make the stacktrace formatting not rely on being inside the except scope.
Suggested-by: Alex Hall [email protected]

Fixes #3762

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • tox

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • Yes. - Link to PR:

  • No.

Checklist:

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

@xrmx xrmx requested a review from a team March 13, 2024 15:42
@xrmx xrmx force-pushed the better-exception-handling-3762 branch 2 times, most recently from 1bd39ca to 2d004dc Compare March 13, 2024 16:23
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

Left a few comments but approving in advance, thanks for the PR

@xrmx xrmx force-pushed the better-exception-handling-3762 branch from b980f88 to 6b3548e Compare March 14, 2024 21:04
@xrmx
Copy link
Contributor Author

xrmx commented Mar 15, 2024 via email

@xrmx xrmx force-pushed the better-exception-handling-3762 branch from c42a977 to f6cf3d8 Compare March 18, 2024 08:57
@xrmx xrmx changed the title Make record_exception more robust handling then outside the except scope Make record_exception more robust handling them outside the except scope Mar 18, 2024
@xrmx
Copy link
Contributor Author

xrmx commented Mar 18, 2024

Fixed comment

…he except scope

Make the stacktrace formatting not rely on being inside the except
scope.

Fixes open-telemetry#3762

Suggested-by: Alex Hall <[email protected]>
@xrmx xrmx force-pushed the better-exception-handling-3762 branch from f6cf3d8 to bb454b7 Compare March 19, 2024 10:12
@ocelotl ocelotl merged commit 06b82aa into open-telemetry:main Mar 21, 2024
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.

Span.record_exception doesn't use the exception parameter to format the stacktrace
4 participants