Documentation
¶
Index ¶
Constants ¶
const ( // DSN for the "main" sentry project. Everything goes in the same project, until we have a good reason to deviate. SentryMainDSN string = "https://a0546c06ff00cb18c7867c5783f96763@o4507623795523584.ingest.us.sentry.io/4507623799193600" )
Variables ¶
This section is empty.
Functions ¶
func HasNuonStackTrace ¶
HasNuonStackTrace reports whether the provided error contains at least one stack trace that originated in Nuon code.
func NewUserFacing ¶
NewUserFacing creates a new error with a message intended for direct consumption by an end user.
This is the equivalent of WithUserFacing, but for use when there's no underlying error to be wrapped.
func ReportToSentry ¶
func ReportToSentry(err error, opt *SentryErrOptions) string
ReportToSentry reports an error to sentry, populating the data in a standardized manner for all Nuon errors.
func WithUserFacing ¶
WithUserFacing wraps another error with a message intended for direct consumption by an end user.
Use this function when there is exactly one known user who will consume the message. For example:
- DO use this in a CLI command where it's known that a CLI user will see the message
- DO NOT use this on the server side of ctl-api, where the caller may be CLI or terraform
This function will also ensure a stack trace is collected. Stack traces are emitted to sentry, but never shown to end users.
If there is no underlying error to be wrapped, use NewUserFacing instead.
Types ¶
type SentryErrOptions ¶
SentryErrOption is a functional option type for passing additional options to a SentryErr.
type SentryTagger ¶
An SentryTagger is an error that additionally returns a set of k/v pairs to be emitted with Snetry events.
If multiple errors in the causal chain emit tags, the tag emitted by the error highest in the chain will be used.