Skip to content

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

Merged
ocelotl merged 6 commits intoopen-telemetry:mainfrom
xrmx:better-exception-handling-3762
Mar 21, 2024
Merged

Make record_exception more robust handling them outside the except scope#3778
ocelotl merged 6 commits intoopen-telemetry:mainfrom
xrmx:better-exception-handling-3762

Conversation

@xrmx
Copy link
Copy Markdown
Contributor

@xrmx xrmx commented Mar 13, 2024

Description

Make the stacktrace formatting not rely on being inside the except scope.
Suggested-by: Alex Hall alex.mojaki@gmail.com

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <alex.mojaki@gmail.com>
@xrmx xrmx force-pushed the better-exception-handling-3762 branch from f6cf3d8 to bb454b7 Compare March 19, 2024 10:12
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