Skip to content

Commit

Permalink
feat: display sentry levels when capturing messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Mar 30, 2024
1 parent 92e17ce commit 93717b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion frontend/src/lib/components/Errors/ErrorDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export function getExceptionPropertiesFrom(eventProperties: Record<string, any>)
$active_feature_flags,
$sentry_url,
$sentry_exception,
$level,
} = eventProperties

let $exception_stack_trace_raw = eventProperties.$exception_stack_trace_raw
Expand Down Expand Up @@ -151,6 +152,7 @@ export function getExceptionPropertiesFrom(eventProperties: Record<string, any>)
$active_feature_flags,
$sentry_url,
$exception_stack_trace_raw,
$level,
}
}

Expand All @@ -172,13 +174,14 @@ export function ErrorDisplay({ event }: { event: EventType | RecordingEventType
$active_feature_flags,
$sentry_url,
$exception_stack_trace_raw,
$level,
} = getExceptionPropertiesFrom(event.properties)

return (
<div className="flex flex-col space-y-2 pr-4 pb-2">
<h1 className="mb-0">{$exception_message}</h1>
<div className="flex flex-row gap-2 flex-wrap">
<LemonTag type="danger">{$exception_type}</LemonTag>
<LemonTag type="danger">{$exception_type || $level}</LemonTag>
<TitledSnack
type="success"
title="captured by"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/loadPostHogJS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function loadPostHogJS(): void {
dsn: window.SENTRY_DSN,
environment: window.SENTRY_ENVIRONMENT,
...(location.host.includes('posthog.com') && {
integrations: [new posthog.SentryIntegration(posthog, 'posthog', 1899813)],
integrations: [new posthog.SentryIntegration(posthog, 'posthog', 1899813, undefined, '*')],

Check failure on line 85 in frontend/src/loadPostHogJS.tsx

View workflow job for this annotation

GitHub Actions / Code quality checks

Expected 1-4 arguments, but got 5.
}),
})
}
Expand Down

0 comments on commit 93717b8

Please sign in to comment.