Skip to content

Commit a507936

Browse files
author
R9 Fundamentals
committed
fixes
1 parent a2839ef commit a507936

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/core/diagnostics/metrics-generator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ For more information, see [dotnet add package](../tools/dotnet-package-add.md) o
3939

4040
Generic attributes require C# 11 or later. For C# 10 or earlier, use nongeneric attributes instead.
4141

42-
The following example shows a class that declares two metrics. The methods are marked with an attribute and are declared as `static` and `partial`.
42+
The following example shows a class that declares three metrics. The methods are marked with an attribute and are declared as `static` and `partial`.
4343
The code generator runs at build time and provides an implementation of these methods, along with accompanying
4444
types.
4545

docs/core/diagnostics/metrics-strongly-typed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ All three metric definitions `CreateLatency`, `CreateTotalCount`, and `CreateTot
7474

7575
The following code shows how to create and use these metrics in a class:
7676

77-
:::code language="csharp" source="snippets/MetricsGen/MyClass.cs" id ="creation":::
77+
:::code language="csharp" source="snippets/MetricsGen/MyClass.cs" id ="creationwithtags":::
7878

7979
In the preceding `MyClass.DoWork` method, a `MetricTags` object is populated with values for each tag. This single `tags` object is then passed to all three instruments when recording data. The `Latency` metric (a histogram) records the elapsed time, and both counters (`TotalCount` and `TotalFailures`) record occurrence counts. Because all metrics share the same tag object type, the tags (`Dim1DimensionName`, `Operation`, `Dim2`, `Dim3`, `DimensionNameOfParentOperation`) are present on every measurement.
8080

docs/core/diagnostics/snippets/MetricsGen/MyClass.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public void ReportSampleFailuresCount()
5858
using System.Diagnostics.Metrics;
5959
using MetricsGen;
6060

61-
// <creation>
61+
// <creationwithtags>
6262
internal class MyClass
63-
{
63+
{
6464
private readonly Latency _latencyMetric;
6565
private readonly TotalCount _totalCountMetric;
6666
private readonly TotalFailures _totalFailuresMetric;
@@ -105,7 +105,7 @@ public void DoWork()
105105
}
106106
}
107107
}
108-
// </creation>
108+
// </creationwithtags>
109109
#elif THIRD
110110

111111
using MetricsGen;

0 commit comments

Comments
 (0)