|
@@ -25,18 +25,22 @@ import (
|
|
|
|
|
|
func main() {
|
|
|
err := sentry.Init(sentry.ClientOptions{
|
|
|
- Dsn: "${params.dsn}",
|
|
|
+ Dsn: "${params.dsn}",${
|
|
|
+ params.isPerformanceSelected
|
|
|
+ ? `
|
|
|
// Set TracesSampleRate to 1.0 to capture 100%
|
|
|
// of transactions for performance monitoring.
|
|
|
// We recommend adjusting this value in production,
|
|
|
- TracesSampleRate: 1.0,
|
|
|
+ TracesSampleRate: 1.0,`
|
|
|
+ : ''
|
|
|
+ }
|
|
|
})
|
|
|
if err != nil {
|
|
|
log.Fatalf("sentry.Init: %s", err)
|
|
|
}
|
|
|
}`;
|
|
|
|
|
|
-const getVerifySnippet = () => `
|
|
|
+const getVerifySnippet = (params: Params) => `
|
|
|
package main
|
|
|
|
|
|
import (
|
|
@@ -48,11 +52,15 @@ import (
|
|
|
|
|
|
func main() {
|
|
|
err := sentry.Init(sentry.ClientOptions{
|
|
|
- Dsn: "___PUBLIC_DSN___",
|
|
|
+ Dsn: "___PUBLIC_DSN___",${
|
|
|
+ params.isPerformanceSelected
|
|
|
+ ? `
|
|
|
// Set TracesSampleRate to 1.0 to capture 100%
|
|
|
// of transactions for performance monitoring.
|
|
|
// We recommend adjusting this value in production,
|
|
|
- TracesSampleRate: 1.0,
|
|
|
+ TracesSampleRate: 1.0,`
|
|
|
+ : ''
|
|
|
+ }
|
|
|
})
|
|
|
if err != nil {
|
|
|
log.Fatalf("sentry.Init: %s", err)
|
|
@@ -92,7 +100,7 @@ const onboarding: OnboardingConfig = {
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
- verify: () => [
|
|
|
+ verify: (params: Params) => [
|
|
|
{
|
|
|
type: StepType.VERIFY,
|
|
|
description: t(
|
|
@@ -101,7 +109,7 @@ const onboarding: OnboardingConfig = {
|
|
|
configurations: [
|
|
|
{
|
|
|
language: 'go',
|
|
|
- code: getVerifySnippet(),
|
|
|
+ code: getVerifySnippet(params),
|
|
|
},
|
|
|
],
|
|
|
},
|