Skip to content

Commit e023381

Browse files
Apply suggestions from code review
Co-authored-by: Carlos Sánchez López <[email protected]>
1 parent 9d1a352 commit e023381

File tree

6 files changed

+68
-60
lines changed

6 files changed

+68
-60
lines changed

xml/System.Diagnostics.Metrics/IMeterFactory.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@
1616
</Interfaces>
1717
<Docs>
1818
<summary>A factory for creating <see cref="T:System.Diagnostics.Metrics.Meter" /> instances.</summary>
19-
<remarks>Meter factories will be accountable for the following responsibilities:
20-
- Creating a new meter.
21-
- Attaching the factory instance as a scope to the Meter constructor for all created Meter objects.
22-
- Storing created meters in a cache and returning a cached instance if a meter with the same parameters (name, version, and tags) is requested.
23-
- Disposing of all cached Meter objects upon factory disposal.</remarks>
19+
<remarks>
20+
<para>Meter factories will be accountable for the following responsibilities:</para>
21+
<ul>
22+
<li>Creating a new meter.</li>
23+
<li>Attaching the factory instance as a scope to the Meter constructor for all created Meter objects.</li>
24+
<li>Storing created meters in a cache and returning a cached instance if a meter with the same parameters (name, version, and tags) is requested.</li>
25+
<li>Disposing of all cached Meter objects upon factory disposal.</li>
26+
</ul>
27+
</remarks>
2428
</Docs>
2529
<Members>
2630
<Member MemberName="Create">

xml/System.Diagnostics.Metrics/Instrument.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,11 @@
116116
<Docs>
117117
<param name="meter">The meter that created the instrument.</param>
118118
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
119-
<param name="unit">Optional instrument unit of measurements.</param>
120-
<param name="description">Optional instrument description.</param>
121-
<param name="tags">Optional instrument tags.</param>
122-
<summary>Protected constructor to initialize the common instrument properties like the meter, name, description, and unit.
123-
All classes extending Instrument need to call this constructor when constructing object of the extended class.</summary>
124-
<remarks>To be added.</remarks>
119+
<param name="unit">An optional instrument unit of measurements.</param>
120+
<param name="description">An optional instrument description.</param>
121+
<param name="tags">An optional instrument tags.</param>
122+
<summary>Protected constructor to initialize the common instrument properties like the meter, name, description, and unit.</summary>
123+
<remarks> All classes extending <see cref="T:System.Diagnostics.Metrics.Instrument"/> need to call this constructor when constructing an object of the extended class.</remarks>
125124
</Docs>
126125
</Member>
127126
<Member MemberName="Description">

xml/System.Diagnostics.Metrics/Instrument`1.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,11 @@ This class supports only the following generic parameter types: <xref:System.Byt
136136
<Docs>
137137
<param name="meter">The meter that created the instrument.</param>
138138
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
139-
<param name="unit">Optional instrument unit of measurements.</param>
140-
<param name="description">Optional instrument description.</param>
141-
<param name="tags">Optional instrument tags.</param>
142-
<summary>Create the metrics instrument using the properties meter, name, description, and unit.
143-
All classes extending Instrument{T} need to call this constructor when constructing object of the extended class.</summary>
144-
<remarks>To be added.</remarks>
139+
<param name="unit">An optional instrument unit of measurements.</param>
140+
<param name="description">An optional instrument description.</param>
141+
<param name="tags">An optional instrument tags.</param>
142+
<summary>Creates a metrics instrument instance using the properties meter, name, description, and unit.</summary>
143+
<remarks>All classes extending <see cref=""T:System.Diagnostics.Metrics.Instrument`1""/> need to call this constructor when constructing an object of the extended class.</remarks>
145144
</Docs>
146145
</Member>
147146
<Member MemberName="RecordMeasurement">

xml/System.Diagnostics.Metrics/Meter.xml

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@
166166
<param name="tags">The optional Meter tags.</param>
167167
<param name="scope">The optional Meter scope.</param>
168168
<summary>Initializes a new instance of the Meter using the meter name and version.</summary>
169-
<remarks>You can use the scope object to link several Meters with a particular scope.
170-
For instance, a dependency injection container can choose to associate all Meters that are created within the container with its own scope.
171-
If the scope object is <see langword="null" />, it indicates that the Meter is not linked to any particular scope.</remarks>
169+
<remarks>You can use the scope object to link several Meters with a particular scope. For instance, a dependency injection container can choose to associate all Meters that are created within the container with its own scope. If the scope object is <see langword="null" />, it indicates that the Meter is not linked to any particular scope.</remarks>
172170
</Docs>
173171
</Member>
174172
<Member MemberName="CreateCounter&lt;T&gt;">
@@ -296,14 +294,23 @@ Counter is an instrument that supports non-negative increments. Example uses for
296294
</Parameters>
297295
<Docs>
298296
<typeparam name="T">To be added.</typeparam>
299-
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
300-
<param name="unit">Optional instrument unit of measurements.</param>
301-
<param name="description">Optional instrument description.</param>
302-
<param name="tags">tags to attach to the counter.</param>
303-
<summary>Create a metrics Counter object.</summary>
297+
<param name="name">The instrument name. It cannot be <see langword="null" />.</param>
298+
<param name="unit">An optional instrument unit of measurements.</param>
299+
<param name="description">An optional instrument description.</param>
300+
<param name="tags">The tags to attach to the counter.</param>
301+
<summary>Creates a metrics Counter object.</summary>
304302
<returns>To be added.</returns>
305-
<remarks>Counter is an Instrument which supports non-negative increments.
306-
Example uses for Counter: count the number of bytes received, count the number of requests completed, count the number of accounts created, count the number of checkpoints run, and count the number of HTTP 5xx errors.</remarks>
303+
<remarks>
304+
<para>Counter is an Instrument that supports non-negative increments.</para>
305+
<para>Example uses for Counter:</para>
306+
<ul>
307+
<li>Count the number of bytes received.</li>
308+
<li>Count the number of requests completed.</li>
309+
<li>Count the number of accounts created.</li>
310+
<li>Count the number of checkpoints run.</li>
311+
<li>Count the number of HTTP 5xx errors.</li>
312+
</ul>
313+
</remarks>
307314
</Docs>
308315
</Member>
309316
<Member MemberName="CreateHistogram&lt;T&gt;">
@@ -425,11 +432,11 @@ Example uses for Histogram: The request duration and the size of the response pa
425432
</Parameters>
426433
<Docs>
427434
<typeparam name="T">To be added.</typeparam>
428-
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
429-
<param name="unit">Optional instrument unit of measurements.</param>
430-
<param name="description">Optional instrument description.</param>
431-
<param name="tags">tags to attach to the counter.</param>
432-
<summary>Histogram is an Instrument which can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentile.</summary>
435+
<param name="name">The instrument name. It cannot be <see langword="null" />.</param>
436+
<param name="unit">An optional instrument unit of measurements.</param>
437+
<param name="description">An optional instrument description.</param>
438+
<param name="tags">The tags to attach to the counter.</param>
439+
<summary>Creates an Histogram instance, which is an Instrument that can be used to report arbitrary values that are likely to be statistically meaningful. It is intended for statistics such as histograms, summaries, and percentile.</summary>
433440
<returns>To be added.</returns>
434441
<remarks>Example uses for Histogram: the request duration and the size of the response payload.</remarks>
435442
</Docs>
@@ -710,12 +717,12 @@ Example uses for ObservableCounter: The number of page faults for each process.
710717
</Parameters>
711718
<Docs>
712719
<typeparam name="T">To be added.</typeparam>
713-
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
720+
<param name="name">The instrument name. It cannot be <see langword="null" />.</param>
714721
<param name="observeValues">The callback to call to get the measurements when the <see cref="M:System.Diagnostics.Metrics.ObservableInstrument`1.Observe" /> is called by <see cref="M:System.Diagnostics.Metrics.MeterListener.RecordObservableInstruments" />.</param>
715-
<param name="unit">Optional instrument unit of measurements.</param>
716-
<param name="description">Optional instrument description.</param>
717-
<param name="tags">tags to attach to the counter.</param>
718-
<summary>ObservableCounter is an Instrument which reports monotonically increasing value(s) when the instrument is being observed.</summary>
722+
<param name="unit">An optional instrument unit of measurements.</param>
723+
<param name="description">An optional instrument description.</param>
724+
<param name="tags">The tags to attach to the counter.</param>
725+
<summary>Creates an ObservableCounter instance, which is an Instrument that reports monotonically increasing value(s) when the instrument is being observed.</summary>
719726
<returns>To be added.</returns>
720727
<remarks>Example uses for ObservableCounter: The number of page faults for each process.</remarks>
721728
</Docs>
@@ -786,12 +793,12 @@ Example uses for ObservableCounter: The number of page faults for each process.
786793
</Parameters>
787794
<Docs>
788795
<typeparam name="T">To be added.</typeparam>
789-
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
796+
<param name="name">The instrument name. It cannot be <see langword="null" />.</param>
790797
<param name="observeValue">The callback to call to get the measurements when the <see cref="M:System.Diagnostics.Metrics.ObservableInstrument`1.Observe" /> is called by <see cref="M:System.Diagnostics.Metrics.MeterListener.RecordObservableInstruments" /></param>
791-
<param name="unit">Optional instrument unit of measurements.</param>
792-
<param name="description">Optional instrument description.</param>
793-
<param name="tags">tags to attach to the counter.</param>
794-
<summary>ObservableCounter is an Instrument which reports monotonically increasing value(s) when the instrument is being observed.</summary>
798+
<param name="unit">An optional instrument unit of measurements.</param>
799+
<param name="description">An optional instrument description.</param>
800+
<param name="tags">The tags to attach to the counter.</param>
801+
<summary>Creates an ObservableCounter instance, which is an Instrument that reports monotonically increasing value(s) when the instrument is being observed.</summary>
795802
<returns>To be added.</returns>
796803
<remarks>Example uses for ObservableCounter: The number of page faults for each process.</remarks>
797804
</Docs>
@@ -862,12 +869,12 @@ Example uses for ObservableCounter: The number of page faults for each process.
862869
</Parameters>
863870
<Docs>
864871
<typeparam name="T">To be added.</typeparam>
865-
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
872+
<param name="name">The instrument name. It cannot be <see langword="null" />.</param>
866873
<param name="observeValue">The callback to call to get the measurements when the <see cref="M:System.Diagnostics.Metrics.ObservableInstrument`1.Observe" /> is called by <see cref="M:System.Diagnostics.Metrics.MeterListener.RecordObservableInstruments" />.</param>
867-
<param name="unit">Optional instrument unit of measurements.</param>
868-
<param name="description">Optional instrument description.</param>
869-
<param name="tags">tags to attach to the counter.</param>
870-
<summary>ObservableCounter is an Instrument which reports monotonically increasing value(s) when the instrument is being observed.</summary>
874+
<param name="unit">An optional instrument unit of measurements.</param>
875+
<param name="description">An optional instrument description.</param>
876+
<param name="tags">The tags to attach to the counter.</param>
877+
<summary>Creates an ObservableCounter instance, which is an Instrument that reports monotonically increasing value(s) when the instrument is being observed.</summary>
871878
<returns>To be added.</returns>
872879
<remarks>Example uses for ObservableCounter: The number of page faults for each process.</remarks>
873880
</Docs>
@@ -1124,14 +1131,14 @@ Example uses for ObservableCounter: The number of page faults for each process.
11241131
</Parameters>
11251132
<Docs>
11261133
<typeparam name="T">To be added.</typeparam>
1127-
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
1134+
<param name="name">The instrument name. It cannot be <see langword="null" />.</param>
11281135
<param name="observeValues">The callback to call to get the measurements when the <see cref="M:System.Diagnostics.Metrics.ObservableInstrument`1.Observe" /> is called by <see cref="M:System.Diagnostics.Metrics.MeterListener.RecordObservableInstruments" />.</param>
1129-
<param name="unit">Optional instrument unit of measurements.</param>
1130-
<param name="description">Optional instrument description.</param>
1131-
<param name="tags">tags to attach to the counter.</param>
1132-
<summary>ObservableGauge is an asynchronous Instrument which reports non-additive value(s) (e.g. the room temperature - it makes no sense to report the temperature value from multiple rooms and sum them up) when the instrument is being observed.</summary>
1136+
<param name="unit">An optional instrument unit of measurements.</param>
1137+
<param name="description">An optional instrument description.</param>
1138+
<param name="tags">The tags to attach to the counter.</param>
1139+
<summary>Creates an ObservableGauge instance, which is an asynchronous Instrument that reports non-additive value(s) when the instrument is being observed.</summary>
11331140
<returns>To be added.</returns>
1134-
<remarks>To be added.</remarks>
1141+
<remarks>For example: The room temperature - it makes no sense to report the temperature value from multiple rooms and sum them up.</remarks>
11351142
</Docs>
11361143
</Member>
11371144
<Member MemberName="CreateObservableGauge&lt;T&gt;">

xml/System.Diagnostics.Metrics/MeterOptions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</Attribute>
2525
</Attributes>
2626
<Docs>
27-
<summary>Options for creating a <see cref="T:System.Diagnostics.Metrics.Meter" />.</summary>
27+
<summary>The options for creating a <see cref="T:System.Diagnostics.Metrics.Meter" />.</summary>
2828
<remarks>To be added.</remarks>
2929
</Docs>
3030
<Members>

xml/System.Diagnostics.Metrics/ObservableInstrument`1.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,11 @@ This class supports only the following generic parameter types: <xref:System.Byt
137137
<Docs>
138138
<param name="meter">The meter that created the instrument.</param>
139139
<param name="name">The instrument name. cannot be <see langword="null" />.</param>
140-
<param name="unit">Optional instrument unit of measurements.</param>
141-
<param name="description">Optional instrument description.</param>
142-
<param name="tags">tags to attach to the counter.</param>
143-
<summary>Create the metrics observable instrument using the properties meter, name, description, and unit.
144-
All classes extending ObservableInstrument{T} need to call this constructor when constructing object of the extended class.</summary>
145-
<remarks>To be added.</remarks>
140+
<param name="unit">An optional instrument unit of measurements.</param>
141+
<param name="description">An optional instrument description.</param>
142+
<param name="tags">The tags to attach to the counter.</param>
143+
<summary>Creates a metrics observable instrument instance using the specified meter, name, description, and unit.</summary>
144+
<remarks>All classes extending <see cref="T:System.Diagnostics.Metrics.ObservableInstrument`1"/> need to call this constructor when constructing an object of the extended class.</remarks>
146145
</Docs>
147146
</Member>
148147
<Member MemberName="IsObservable">

0 commit comments

Comments
 (0)