File tree 1 file changed +19
-0
lines changed
aspnetcore/log-mon/metrics
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,25 @@ Inject the metrics type and record values where needed. Because the metrics type
132
132
133
133
:::code language="csharp" source="~ /log-mon/metrics/metrics/samples/custom-metrics/Program.cs" id="snippet_InjectAndUseMetrics":::
134
134
135
+ To monitor the "Contoso.Web" meter, use the following [ dotnet-counters] ( /dotnet/core/diagnostics/dotnet-counters ) command.
136
+
137
+ ``` dotnetcli
138
+ dotnet-counters monitor -n WebMetric --counters Contoso.Web
139
+ ```
140
+
141
+ Output similar to the following is displayed:
142
+
143
+
144
+ ``` dotnetcli
145
+ Press p to pause, r to resume, q to quit.
146
+ Status: Running
147
+
148
+ [Contoso.Web]
149
+ contoso.product.sold (Count / 1 sec)
150
+ contoso.product.name=Eggs 12
151
+ contoso.product.name=Milk 0
152
+ ```
153
+
135
154
## View metrics in Grafana with OpenTelemetry and Prometheus
136
155
137
156
### Overview
You can’t perform that action at this time.
0 commit comments