Skip to content

Commit 85e732b

Browse files
committed
Add more details on Reporting
1 parent 776d70c commit 85e732b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/design/core/metrics/Design.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
### Metric
33
* A representation of data collected
44
* Metric can be one of the following types: Counter, Gauge, Timer
5-
* Metric can have tags. A Tag represent the category it belongs to (like Default, HttpClient, Streaming etc)
5+
* Metric can be associated to a category. Some of the metric categories are Default, HttpClient, Streaming etc
66

77
### MetricRegistry
88

@@ -186,6 +186,12 @@ another class to filter metric categories that are not set in MetricConfiguratio
186186
* It would be useful to get the low-level API metrics in these modules, so SDK will expose APIs to get an immutable version of the
187187
MetricRegistry object so that upstream classes can use that information in their metric calculation.
188188

189+
### Reporting
190+
* Collected metrics are reported to the configured publishers at the end of each Api Call by calling `registerMetrics(MetricRegistry)` method on MetricPublisher.
191+
* The MetricRegistry argument in the registerMetrics method will have data on the entire Api Call including retries.
192+
* This reporting is done in `MetricsExecutionInterceptor` via `afterExecution()` and `onExecutionFailure()` methods.
193+
* `MetricsExecutionInterceptor` will always be the last configured ExecutionInterceptor in the interceptor chain
194+
189195

190196
## Testing
191197

0 commit comments

Comments
 (0)