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

DM-48101: Sentry helpers #366

Merged
merged 1 commit into from
Jan 22, 2025
Merged

DM-48101: Sentry helpers #366

merged 1 commit into from
Jan 22, 2025

Conversation

fajpunk
Copy link
Member

@fajpunk fajpunk commented Jan 15, 2025

No description provided.

fajpunk added a commit to lsst-sqre/mobu that referenced this pull request Jan 15, 2025
* Replace Safir `SlackException` functionality with Sentry error
reporting.
* Replace `timings` functionality with Sentry tracing.

The biggest conceptual change is that instead of putting error details
on the exception objects themselves, they get put into the
global-per-business-execution Sentry scope, and whatever is in the scope
is sent to Sentry when an error occurs (except for a very few cases
where we still attach info directly to exceptions).

This instruments custom scopes and transactions and fingerprints, which
are described in the new `sentry.rst` file in the docs.

Finally, this uses some more general Sentry helpers proposed for Safir
in lsst-sqre/safir#366.
@fajpunk fajpunk requested review from rra and jonathansick January 15, 2025 19:13
@jonathansick
Copy link
Member

The remaining docs issue is

(user-guide/sentry: line   53) broken    https://github.com/getsentry/sentry/issues/64354#issuecomment-1927839632 - Anchor 'issuecomment-1927839632' not found

You can fix this by either ignoring the link altogether (see https://documenteer.lsst.io/guides/toml-reference.html#ignore in documenteer.toml) or to be more precise by appending to conf.py a linkcheck_anchors_ignore_for_url configuration. The issue is that the anchor probably isn't initially loading without javascript or something like that.

Copy link
Member

@jonathansick jonathansick left a comment

Choose a reason for hiding this comment

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

The integration helpers look great. My comments are really about turning the documentation page into a how-to guide rather than being a reference for the helpers.

docs/user-guide/sentry.rst Outdated Show resolved Hide resolved
docs/user-guide/sentry.rst Outdated Show resolved Hide resolved
docs/user-guide/sentry.rst Outdated Show resolved Hide resolved
docs/user-guide/sentry.rst Outdated Show resolved Hide resolved
@fajpunk fajpunk force-pushed the tickets/DM-48101/sentry-helpers branch 2 times, most recently from cbd2812 to a26f5e4 Compare January 21, 2025 20:08
@fajpunk fajpunk requested a review from jonathansick January 21, 2025 20:08
Copy link
Member

@jonathansick jonathansick left a comment

Choose a reason for hiding this comment

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

Perfect, this is the documentation I was looking for. Thanks!

docs/user-guide/sentry.rst Outdated Show resolved Hide resolved
@fajpunk fajpunk force-pushed the tickets/DM-48101/sentry-helpers branch from a26f5e4 to f5f8025 Compare January 21, 2025 22:47
fix docs

fix linkcheck

reorganize docs
@fajpunk fajpunk force-pushed the tickets/DM-48101/sentry-helpers branch from f5f8025 to eef7e5e Compare January 21, 2025 22:48
@fajpunk fajpunk enabled auto-merge January 21, 2025 22:48
@fajpunk fajpunk merged commit 5eee3d0 into main Jan 22, 2025
7 checks passed
@fajpunk fajpunk deleted the tickets/DM-48101/sentry-helpers branch January 22, 2025 16:39
fajpunk added a commit to lsst-sqre/mobu that referenced this pull request Jan 22, 2025
* Replace Safir `SlackException` functionality with Sentry error
reporting.
* Replace `timings` functionality with Sentry tracing.

The biggest conceptual change is that instead of putting error details
on the exception objects themselves, they get put into the
global-per-business-execution Sentry scope, and whatever is in the scope
is sent to Sentry when an error occurs (except for a very few cases
where we still attach info directly to exceptions).

This instruments custom scopes and transactions and fingerprints, which
are described in the new `sentry.rst` file in the docs.

Finally, this uses some more general Sentry helpers proposed for Safir
in lsst-sqre/safir#366.
fajpunk added a commit to lsst-sqre/mobu that referenced this pull request Jan 28, 2025
* Replace Safir `SlackException` functionality with Sentry error
reporting.
* Replace `timings` functionality with Sentry tracing.

The biggest conceptual change is that instead of putting error details
on the exception objects themselves, they get put into the
global-per-business-execution Sentry scope, and whatever is in the scope
is sent to Sentry when an error occurs (except for a very few cases
where we still attach info directly to exceptions).

This instruments custom scopes and transactions and fingerprints, which
are described in the new `sentry.rst` file in the docs.

Finally, this uses some more general Sentry helpers proposed for Safir
in lsst-sqre/safir#366.

docs fix

more docs fixes

fix bad autocomplete contextlib import

move remove_ansi_escape_sequences

no need for gafaelfawr user tag

Add docstrings

Init sentry in create_app

split notebook execution into many methods

don't shove so much into an fstring

nicer self name references

separate image_description and image_reference tags

remove username from fingerprint

transaction refactor

variable for business name

move tap 'make_client' span into the actual 'make_client' method

transaction refactor again

update sentry docs

put back explicit tap client creation error

add tests for sentry transactions

changelog entry
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.

2 participants