Skip to content

Commit 03cd3e8

Browse files
Java: update configuration docs. (#2727)
Fixes getsentry/sentry-java#992
1 parent a75122b commit 03cd3e8

File tree

1 file changed

+74
-5
lines changed
  • src/platforms/java/common/configuration

1 file changed

+74
-5
lines changed

src/platforms/java/common/configuration/index.mdx

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,37 +97,90 @@ The following options can all be configured as described above: via a `sentry.pr
9797

9898
To set the application version that will be sent with each event, use the `release` option:
9999

100-
```
100+
```properties {tabTitle:sentry.properties}
101101
release=1.0.0
102102
```
103103

104+
```properties {tabTitle:environment variable}
105+
SENTRY_RELEASE=1.0.0
106+
```
107+
108+
```properties {tabTitle:system property}
109+
sentry.release=1.0.0
110+
```
111+
104112
### Distribution
105113

106114
To set the application distribution that will be sent with each event, use the `dist` option:
107115

108-
```
116+
```properties {tabTitle:sentry.properties}
109117
release=1.0.0
110118
dist=x86
111119
```
112120

121+
```properties {tabTitle:environment variable}
122+
SENTRY_RELEASE=1.0.0
123+
SENTRY_DIST=x86
124+
```
125+
126+
```properties {tabTitle:system property}
127+
sentry.release=1.0.0
128+
sentry.dist=x86
129+
```
130+
113131
The distribution is only useful (and used) if the `release` is also set.
114132

115133
### Environment
116134

117135
To set the application environment that will be sent with each event, use the `environment` option:
118136

119-
```
137+
```properties {tabTitle:sentry.properties}
120138
environment=staging
121139
```
122140

141+
```properties {tabTitle:environment variable}
142+
SENTRY_ENVIRONMENT=staging
143+
```
144+
145+
```properties {tabTitle:system property}
146+
sentry.environment=staging
147+
```
148+
123149
### Server Name
124150

125151
To set the server name that will be sent with each event, use the `servername` option:
126152

127-
```
153+
```properties {tabTitle:sentry.properties}
128154
servername=host1
129155
```
130156

157+
```properties {tabTitle:environment variable}
158+
SENTRY_SERVERNAME=host1
159+
```
160+
161+
```properties {tabTitle:system property}
162+
sentry.servername=host1
163+
```
164+
165+
### Tags
166+
167+
To set the common tags that will be sent with each event, use the `tags` options:
168+
169+
```properties {tabTitle:sentry.properties}
170+
tags.first_tag=first-tag-value
171+
tags.second_tag=second-tag-value
172+
```
173+
174+
```properties {tabTitle:environment variable}
175+
SENTRY_TAGS_FIRST_TAG=first-tag-value
176+
SENTRY_TAGS_SECOND_TAG=second-tag-value
177+
```
178+
179+
```properties {tabTitle:system property}
180+
sentry.tags.first_tag=first-tag-value
181+
sentry.tags.second_tag=second-tag-value
182+
```
183+
131184
## Configuring Timeouts
132185

133186
It’s possible to manually set the connection timeouts length with `connectionTimeoutMillis` and `readTimeoutMillis`:
@@ -165,10 +218,26 @@ See [Java Networking and Proxies](http://docs.oracle.com/javase/8/docs/technotes
165218

166219
Alternatively, using Sentry options (only affects the Sentry HTTP client, useful inside shared application containers),
167220

168-
```properties
221+
```properties {tabTitle:sentry.properties}
169222
proxy.host=proxy.example.com
170223
# optional
171224
proxy.port=8080 # default 80
172225
proxy.user=proxy-user
173226
proxy.pass=proxy-password
174227
```
228+
229+
```properties {tabTitle:environment variable}
230+
SENTRY_PROXY_HOST=proxy.example.com
231+
# optional
232+
SENTRY_PROXY_PORT=8080 # default 80
233+
SENTRY_PROXY_USER=proxy-user
234+
SENTRY_PROXY_PASS=proxy-password
235+
```
236+
237+
```properties {tabTitle:system property}
238+
sentry.proxy.host=proxy.example.com
239+
# optional
240+
sentry.proxy.port=8080 # default 80
241+
sentry.proxy.user=proxy-user
242+
sentry.proxy.pass=proxy-password
243+
```

0 commit comments

Comments
 (0)