Skip to content

Commit 71babf3

Browse files
authored
fix: Use ___PUBLIC_DSN___ instead of ___DSN___ for all current SDKs (#7334)
1 parent 1817851 commit 71babf3

File tree

20 files changed

+39
-39
lines changed

20 files changed

+39
-39
lines changed

src/includes/platforms/configuration/integrations/redux.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const store = createStore(
1111

1212
<Alert level="info" title="Note">
1313

14-
Because Sentry uses a redux **enhancer**, you should pass it as indicated above rather than passing it to`applyMiddleware`. Don't call the method when you pass it to `createStore`.
14+
Because Sentry uses a redux **enhancer**, you should pass it as indicated above rather than passing it to `applyMiddleware`. Don't call the method when you pass it to `createStore`.
1515

1616
</Alert>
1717

@@ -21,7 +21,7 @@ By default, Sentry SDKs normalize any context to a depth of 3. You may want to i
2121

2222
```javascript
2323
Sentry.init({
24-
dsn: "___DSN___",
24+
dsn: "___PUBLIC_DSN___",
2525
normalizeDepth: 10, // Or however deep you want your state context to be.
2626
});
2727
```

src/platform-includes/enriching-events/user-feedback/sdk-api-example/javascript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You could also collect feedback and send it when an error occurs via the SDK's `
1919

2020
```js
2121
Sentry.init({
22-
dsn: '__DSN__',
22+
dsn: '___PUBLIC_DSN___',
2323
beforeSend: event => {
2424
const userFeedback = collectYourUserFeedback();
2525
const feedback = {

src/platform-includes/getting-started-config/javascript.remix.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as Sentry from "@sentry/remix";
1010
import { useEffect } from "react";
1111

1212
Sentry.init({
13-
dsn: "___DSN___",
13+
dsn: "___PUBLIC_DSN___",
1414
integrations: [
1515
new Sentry.BrowserTracing({
1616
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
@@ -43,7 +43,7 @@ import * as Sentry from "@sentry/remix";
4343
import { useEffect } from "react";
4444

4545
Sentry.init({
46-
dsn: "___DSN___",
46+
dsn: "___PUBLIC_DSN___",
4747

4848
// Set tracesSampleRate to 1.0 to capture 100%
4949
// of transactions for performance monitoring.
@@ -60,7 +60,7 @@ import { prisma } from "~/db.server";
6060
import * as Sentry from "@sentry/remix";
6161

6262
Sentry.init({
63-
dsn: "___DSN___",
63+
dsn: "___PUBLIC_DSN___",
6464
tracesSampleRate: 1,
6565
integrations: [new Sentry.Integrations.Prisma({ client: prisma })],
6666
// ...

src/platform-includes/performance/custom-performance-metrics/python.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Adding custom metrics is supported in Sentry's Python SDK version `1.16.0` and a
22

33
```python
44
sentry_sdk.init(
5-
dsn="___DSN___",
5+
dsn="___PUBLIC_DSN___",
66
)
77
```
88

@@ -27,7 +27,7 @@ and fetch the transaction manually.
2727

2828
```python
2929
sentry_sdk.init(
30-
dsn="___DSN___",
30+
dsn="___PUBLIC_DSN___",
3131
_experiments={
3232
"custom_measurements": True, # for versions before 1.16.0
3333
},

src/platform-includes/performance/opentelemetry-setup/go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
sentry.Init(sentry.ClientOptions{
14-
Dsn: "__DSN__",
14+
Dsn: "___PUBLIC_DSN___",
1515
EnableTracing: true,
1616
TracesSampleRate: 1.0,
1717
Debug: true,

src/platform-includes/performance/opentelemetry-setup/javascript.nextjs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
```javascript {filename:sentry.server.config.js}
88
Sentry.init({
9-
dsn: "__DSN__",
9+
dsn: "___PUBLIC_DSN___",
1010
tracesSampleRate: 1.0,
1111
// set the instrumenter to use OpenTelemetry instead of Sentry
1212
instrumenter: "otel",

src/platform-includes/performance/opentelemetry-setup/node.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const {
1818

1919
// Make sure to call `Sentry.init` BEFORE initializing the OpenTelemetry SDK
2020
Sentry.init({
21-
dsn: "__DSN__",
21+
dsn: "___PUBLIC_DSN___",
2222
tracesSampleRate: 1.0,
2323
// set the instrumenter to use OpenTelemetry instead of Sentry
2424
instrumenter: "otel",

src/platform-includes/performance/opentelemetry-setup/ruby.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Initialize Sentry for tracing and set the `instrumenter` to `:otel`:
22

33
```ruby {filename:config/initializers/sentry.rb}
44
Sentry.init do |config|
5-
config.dsn = "__DSN__"
5+
config.dsn = "___PUBLIC_DSN___"
66
config.traces_sample_rate = 1.0
77
# set the instrumenter to use OpenTelemetry instead of Sentry
88
config.instrumenter = :otel

src/platform-includes/performance/opentelemetry-setup/with-java-agent/with-auto-init/java.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ SENTRY_PROPERTIES_FILE=sentry.properties java -javaagent:sentry-opentelemetry-ag
77
Here's the `sentry.properties` file that goes with it:
88

99
```properties {filename:sentry.properties}
10-
dsn=___DSN___
10+
dsn=___PUBLIC_DSN___
1111
traces-sample-rate=1.0
1212
```

src/platform-includes/performance/opentelemetry-setup/with-java-agent/without-auto-init/java.spring-boot.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ If you're not using the auto initialization provided by `sentry-opentelemetry-ag
22
set the `instrumenter` option to `otel`. This disables all Sentry instrumentation and uses the chosen OpenTelemetry tracers for creating spans instead:
33

44
```properties {filename:application.properties}
5-
sentry.dsn=___DSN___
5+
sentry.dsn=___PUBLIC_DSN___
66
sentry.traces-sample-rate=1.0
77
# enable this to see more logs
88
sentry.debug=false

src/platform-includes/performance/opentelemetry-setup/without-java-agent/java.spring-boot.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ val openTelemetry = OpenTelemetrySdk.builder()
4646
You have to set the `instrumenter` option to `otel`. This disables all Sentry instrumentation and uses the chosen OpenTelemetry tracers for creating spans instead.
4747

4848
```properties {filename:application.properties}
49-
sentry.dsn=___DSN___
49+
sentry.dsn=___PUBLIC_DSN___
5050
sentry.traces-sample-rate=1.0
5151
# enable this to see more logs
5252
sentry.debug=false

src/platforms/common/profiling/index.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Profiling depends on Sentry’s performance monitoring product being enabled bef
6161
import Sentry
6262

6363
SentrySDK.start { options in
64-
options.dsn = "___DSN___"
64+
options.dsn = "___PUBLIC_DSN___"
6565
options.tracesSampleRate = 1.0
6666
}
6767
```
@@ -70,7 +70,7 @@ SentrySDK.start { options in
7070
@import Sentry;
7171

7272
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
73-
options.dsn = @"___DSN___";
73+
options.dsn = @"___PUBLIC_DSN___";
7474
options.tracesSampleRate = @1.0;
7575
}];
7676
```
@@ -83,7 +83,7 @@ In `AndroidManifest.xml`:
8383
8484
```xml
8585
<application>
86-
<meta-data android:name="io.sentry.dsn" android:value="___DSN___" />
86+
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN___" />
8787
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
8888
</application>
8989
```
@@ -107,7 +107,7 @@ err := sentry.Init(sentry.ClientOptions{
107107

108108
```python
109109
sentry_sdk.init(
110-
dsn="___DSN___",
110+
dsn="___PUBLIC_DSN___",
111111
traces_sample_rate=1.0,
112112
)
113113
```
@@ -147,7 +147,7 @@ iOS profiling is available starting in SDK version `8.3.1`.
147147
import Sentry
148148

149149
SentrySDK.start { options in
150-
options.dsn = "___DSN___"
150+
options.dsn = "___PUBLIC_DSN___"
151151
options.tracesSampleRate = 1.0 // tracing must be enabled for profiling
152152
options.profilesSampleRate = 1.0 // see also `profilesSampler` if you need custom sampling logic
153153
}
@@ -157,7 +157,7 @@ SentrySDK.start { options in
157157
@import Sentry;
158158

159159
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
160-
options.dsn = @"___DSN___";
160+
options.dsn = @"___PUBLIC_DSN___";
161161
options.tracesSampleRate = @1.0; // tracing must be enabled for profiling
162162
options.profilesSampleRate = @1.0; // see also `profilesSampler` if you need custom sampling logic
163163
}];
@@ -183,7 +183,7 @@ In `AndroidManifest.xml`:
183183
184184
```xml
185185
<application>
186-
<meta-data android:name="io.sentry.dsn" android:value="___DSN___" />
186+
<meta-data android:name="io.sentry.dsn" android:value="___PUBLIC_DSN___" />
187187
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
188188
<meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />
189189
</application>
@@ -213,7 +213,7 @@ def profiles_sampler(sampling_context):
213213
# return a number between 0 and 1 or a boolean
214214

215215
sentry_sdk.init(
216-
dsn="___DSN___",
216+
dsn="___PUBLIC_DSN___",
217217
traces_sample_rate=1.0,
218218

219219
# To set a uniform sample rate
@@ -239,7 +239,7 @@ The feature was experimental prior to version `1.17.0`. To update to the latest
239239

240240
```python
241241
sentry_sdk.init(
242-
dsn="___DSN___",
242+
dsn="___PUBLIC_DSN___",
243243
traces_sample_rate=1.0,
244244
_experiments={
245245
"profiles_sample_rate": 1.0, # for versions before 1.17.0
@@ -297,7 +297,7 @@ Then, make sure both `traces_sample_rate` and `profiles_sample_rate` are set and
297297
# config/initializers/sentry.rb
298298

299299
Sentry.init do |config|
300-
config.dsn = "___DSN___"
300+
config.dsn = "___PUBLIC_DSN___"
301301
config.traces_sample_rate = 1.0
302302
config.profiles_sample_rate = 1.0
303303
end

src/platforms/javascript/guides/react/configuration/integrations/react-router.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ import { wrapUseRoutes } from "@sentry/react";
147147
import { useEffect } from "react";
148148

149149
Sentry.init({
150-
dsn: "___DSN___",
150+
dsn: "___PUBLIC_DSN___",
151151
integrations: [
152152
new Sentry.BrowserTracing({
153153
routingInstrumentation: Sentry.reactRouterV6Instrumentation(

src/platforms/php/common/profiling/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Check out the <PlatformLink to="/performance/">performance setup</PlatformLink>
6565

6666
```php
6767
\Sentry\init([
68-
'dsn' => '___DSN___',
68+
'dsn' => '___PUBLIC_DSN___',
6969
'traces_sample_rate' => 1.0,
7070
]);
7171
```
@@ -74,7 +74,7 @@ Check out the <PlatformLink to="/performance/">performance setup</PlatformLink>
7474

7575
```php
7676
\Sentry\init([
77-
'dsn' => '___DSN___',
77+
'dsn' => '___PUBLIC_DSN___',
7878
'traces_sample_rate' => 1.0,
7979
// Set a sampling rate for profiling - this is relative to traces_sample_rate
8080
'profiles_sample_rate' => 1.0,

src/wizard/javascript/remix/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import * as Sentry from "@sentry/remix";
2323
import { useEffect } from "react";
2424

2525
Sentry.init({
26-
dsn: "___DSN___",
26+
dsn: "___PUBLIC_DSN___",
2727
tracesSampleRate: 1,
2828
integrations: [
2929
new Sentry.BrowserTracing({
@@ -47,7 +47,7 @@ import { prisma } from "~/db.server";
4747
import * as Sentry from "@sentry/remix";
4848

4949
Sentry.init({
50-
dsn: "___DSN___",
50+
dsn: "___PUBLIC_DSN___",
5151
tracesSampleRate: 1,
5252
integrations: [new Sentry.Integrations.Prisma({ client: prisma })],
5353
});

src/wizard/javascript/remix/with-error-monitoring-and-performance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import * as Sentry from "@sentry/remix";
2727
import { useEffect } from "react";
2828

2929
Sentry.init({
30-
dsn: "___DSN___",
30+
dsn: "___PUBLIC_DSN___",
3131
integrations: [
3232
new Sentry.BrowserTracing({
3333
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
@@ -52,7 +52,7 @@ import { prisma } from "~/db.server";
5252
import * as Sentry from "@sentry/remix";
5353

5454
Sentry.init({
55-
dsn: "___DSN___",
55+
dsn: "___PUBLIC_DSN___",
5656
integrations: [new Sentry.Integrations.Prisma({ client: prisma })],
5757
// Performance Monitoring
5858
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!

src/wizard/javascript/remix/with-error-monitoring-and-replay.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import * as Sentry from "@sentry/remix";
2727
import { useEffect } from "react";
2828

2929
Sentry.init({
30-
dsn: "___DSN___",
30+
dsn: "___PUBLIC_DSN___",
3131
integrations: [new Sentry.Replay()],
3232
// Session Replay
3333
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
@@ -41,7 +41,7 @@ Initialize Sentry in your entry point for the server to capture exceptions and g
4141
import * as Sentry from "@sentry/remix";
4242

4343
Sentry.init({
44-
dsn: "___DSN___",
44+
dsn: "___PUBLIC_DSN___",
4545
});
4646
```
4747

src/wizard/javascript/remix/with-error-monitoring-performance-and-replay.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import * as Sentry from "@sentry/remix";
2727
import { useEffect } from "react";
2828

2929
Sentry.init({
30-
dsn: "___DSN___",
30+
dsn: "___PUBLIC_DSN___",
3131
integrations: [
3232
new Sentry.BrowserTracing({
3333
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
@@ -56,7 +56,7 @@ import { prisma } from "~/db.server";
5656
import * as Sentry from "@sentry/remix";
5757

5858
Sentry.init({
59-
dsn: "___DSN___",
59+
dsn: "___PUBLIC_DSN___",
6060
integrations: [new Sentry.Integrations.Prisma({ client: prisma })],
6161
// Performance Monitoring
6262
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!

src/wizard/javascript/remix/with-error-monitoring.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import * as Sentry from "@sentry/remix";
2727
import { useEffect } from "react";
2828

2929
Sentry.init({
30-
dsn: "___DSN___",
30+
dsn: "___PUBLIC_DSN___",
3131
});
3232
```
3333

@@ -37,7 +37,7 @@ Initialize Sentry in your entry point for the server to capture exceptions and g
3737
import * as Sentry from "@sentry/remix";
3838

3939
Sentry.init({
40-
dsn: "___DSN___",
40+
dsn: "___PUBLIC_DSN___",
4141
});
4242
```
4343

src/wizard/python/pylons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Configuration is handled via the sentry namespace:
2727

2828
```ini
2929
[sentry]
30-
dsn=___DSN___
30+
dsn=___PUBLIC_DSN___
3131
include_paths=my.package,my.other.package,
3232
exclude_paths=my.package.crud
3333
```

0 commit comments

Comments
 (0)