You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ALWAYS use the HTTPS form of the URL for deployments in production; the removal of HTTPS is done for
49
-
# demonstration purposes only in this example. Please continue reading after this example for further details.
50
-
- DOTNETMONITOR_Urls=http://+:52323
51
-
# The metrics URL is set in the CMD instruction of the image by default. However, this deployment overrides that with the args setting; manually set the URL to the same value using configuration.
52
-
- DOTNETMONITOR_Metrics__Endpoints=http://+:52325
53
-
# The image will output logging in a json format by default, which is great for ingestion by tools such as Azure Monitor Log Analytics.
54
-
# Switch the logging format to simple for this sample for easier reading.
55
-
- Logging__Console__FormatterName=simple
56
-
volumes:
57
-
- diagvol:/diag
58
-
deploy:
59
-
resources:
60
-
reservations:
61
-
cpus: '0.050'
62
-
memory: 50M
63
-
limits:
64
-
cpus: '0.250'
65
-
memory: 256M
66
-
67
-
volumes:
68
-
diagvol:
69
-
driver_opts:
70
-
type: tmpfs
71
-
device: tmpfs
72
-
```
73
-
</details>
15
+
The [Docker Compose](../samples/Docker/compose.yaml) example demonstrates a deployment of the .NET Monitor 8 container image monitoring an application container as services.
# ALWAYS use the HTTPS form of the URL for deployments in production; the removal of HTTPS is done for
145
-
# demonstration purposes only in this example. Please continue reading after this example for further details.
146
-
- name: DOTNETMONITOR_Urls
147
-
value: http://localhost:52323
148
-
# The metrics URL is set in the CMD instruction of the image by default. However, this deployment overrides that with the args setting; manually set the URL to the same value using configuration.
149
-
- name: DOTNETMONITOR_Metrics__Endpoints
150
-
value: http://+:52325
151
-
volumeMounts:
152
-
- mountPath: /diag
153
-
name: diagvol
154
-
resources:
155
-
requests:
156
-
cpu: 50m
157
-
memory: 32Mi
158
-
limits:
159
-
cpu: 250m
160
-
memory: 256Mi
161
-
volumes:
162
-
- name: diagvol
163
-
emptyDir: {}
164
-
```
165
-
166
-
</details>
167
-
168
-
<details>
169
-
<summary>.NET Monitor 8+</summary>
170
-
171
-
```yaml
172
-
# Tell us about your experience using dotnet monitor: https://aka.ms/dotnet-monitor-survey
173
-
apiVersion: apps/v1
174
-
kind: Deployment
175
-
metadata:
176
-
name: deploy-exampleapp
177
-
spec:
178
-
replicas: 1
179
-
selector:
180
-
matchLabels:
181
-
app: exampleapp
182
-
template:
183
-
metadata:
184
-
labels:
185
-
app: exampleapp
186
-
spec:
187
-
restartPolicy: Always
188
-
containers:
189
-
- name: app
190
-
image: mcr.microsoft.com/dotnet/samples:aspnetapp
191
-
imagePullPolicy: Always
192
-
env:
193
-
- name: ASPNETCORE_URLS
194
-
value: http://+:8080
195
-
- name: DOTNET_DiagnosticPorts
196
-
value: /diag/dotnet-monitor.sock
197
-
volumeMounts:
198
-
- mountPath: /diag
199
-
name: diagvol
200
-
resources:
201
-
limits:
202
-
cpu: 250m
203
-
memory: 512Mi
204
-
- name: monitor
205
-
image: mcr.microsoft.com/dotnet/monitor:8
206
-
# DO NOT use the --no-auth argument for deployments in production; this argument is used for demonstration
207
-
# purposes only in this example. Please continue reading after this example for further details.
# ALWAYS use the HTTPS form of the URL for deployments in production; the removal of HTTPS is done for
216
-
# demonstration purposes only in this example. Please continue reading after this example for further details.
217
-
- name: DOTNETMONITOR_Urls
218
-
value: http://localhost:52323
219
-
# The metrics URL is set in the CMD instruction of the image by default. However, this deployment overrides that with the args setting; manually set the URL to the same value using configuration.
220
-
- name: DOTNETMONITOR_Metrics__Endpoints
221
-
value: http://+:52325
222
-
volumeMounts:
223
-
- mountPath: /diag
224
-
name: diagvol
225
-
resources:
226
-
requests:
227
-
cpu: 50m
228
-
memory: 32Mi
229
-
limits:
230
-
cpu: 250m
231
-
memory: 256Mi
232
-
volumes:
233
-
- name: diagvol
234
-
emptyDir: {}
235
-
```
15
+
The [Kubernetes Deployment](../samples/Kubernetes/deployment.yaml) example demonstrates a deployment of the .NET Monitor 8 container image monitoring an application container within the same pod.
# ALWAYS use the HTTPS form of the URL for deployments in production; the removal of HTTPS is done for
29
+
# demonstration purposes only in this example. Please continue reading after this example for further details.
30
+
- DOTNETMONITOR_Urls=http://+:52323
31
+
# The metrics URL is set in the CMD instruction of the image by default. However, this deployment overrides that with the args setting; manually set the URL to the same value using configuration.
32
+
- DOTNETMONITOR_Metrics__Endpoints=http://+:52325
33
+
# The image will output logging in a json format by default, which is great for ingestion by tools such as Azure Monitor Log Analytics.
34
+
# Switch the logging format to simple for this sample for easier reading.
0 commit comments