,
}),
configurations: [
{
language: 'bash',
code: 'go get github.com/getsentry/sentry-go/gin',
},
],
},
],
configure: params => [
{
type: StepType.CONFIGURE,
description: t(
"Import and initialize the Sentry SDK early in your application's setup:"
),
configurations: [
{
language: 'go',
code: getConfigureSnippet(params),
},
{
description: (
{tct(
'[sentryGinCode:sentrygin] accepts a struct of [optionsCode:Options] that allows you to configure how the handler will behave.',
{sentryGinCode: , optionsCode:
}
)}
{tct(
"[sentryGinCode:sentrygin] attaches an instance of [sentryHubLink:*sentry.Hub] to the [ginContextCode:*gin.Context], which makes it available throughout the rest of the request's lifetime. You can access it by using the [getHubFromContextCode:sentrygin.GetHubFromContext()] method on the context itself in any of your proceeding middleware and routes. And it should be used instead of the global [captureMessageCode:sentry.CaptureMessage], [captureExceptionCode:sentry.CaptureException], or any other calls, as it keeps the separation of data between the requests.",
{
sentryGinCode: ,
sentryHubLink: (
,
getHubFromContextCode:
,
captureMessageCode:
,
captureExceptionCode:
,
}
)}
, sentryHubCode:
}
)}
,
})}
),
language: 'go',
code: getBeforeSendSnippet(params),
},
],
},
],
verify: () => [],
};
const docs: Docs = {
onboarding,
};
export default docs;
const AlertWithoutMarginBottom = styled(Alert)`
margin-bottom: 0;
`;