-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[all] OpenTelemetry metrics integration in venice-router (#1303)
Initial integration of openTelemetry in venice-router. Changes: - Before this change, MetricsRepository holding MetricsConfig was passed around from service creation throughout the service code to carrying the config and the metrics. Introduced VeniceMetricsRepository to extend MetricsRepository and also hold VeniceOpenTelemetryMetricsRepository. Introduced VeniceMetricsConfig to include tehuti's MetricConfig and Otel config. Either MetricsRepository or VeniceMetricsRepository can be passed in during router service creation and if VeniceMetricsRepository is used and if otel configs are enabled, otel metrics will be used along with tehuti metrics. - VeniceOpenTelemetryMetricsRepository holds histogramMap and counterMap to create a counter only once regardless for multiple request types and store name: Those should be dimensions instead. - Added new dimensions: venice.store.name, venice.cluster.name, venice.request.method, http.response.status_code, http.response.status_code_category, venice.response.status_code_category, venice.request.validation_outcome, venice.client.type, venice.request.retry_type, venice.request.retry_abort_reason - added new otel metrics for some of the existing router metrics: venice.router.call_time, venice.router.incoming_call_count, venice.router.call_count, venice.router.retry_count, venice.router.aborted_retry_count, venice.router.retry_delay, venice.router.call_key_count - introduced configs to enable/disable this feature and to export the metrics otel.venice.enabled => To enable/disable opentelemetry in venice otel.venice.export.to.log => Export the metrics to logs, for debug purposes otel.venice.export.to.endpoint => Export metrics to the configured endpoint otel.venice.metrics.naming.format => VeniceOpenTelemetryMetricNamingFormat => snake_case (default), pascal_case, camel_case otel.venice.custom.dimensions.map => Can be configured to pass in custom dimensions or system dimensions. - It also uses existing otel configs to configure the endpoints like below and other opentelemetry supported configs otel.exporter.otlp.metrics.protocol otel.exporter.otlp.metrics.endpoint otel.exporter.otlp.metrics.temporality.preference otel.exporter.otlp.metrics.headers otel.exporter.otlp.metrics.default.histogram.aggregation otel.exporter.otlp.metrics.default.histogram.aggregation.max.scale otel.exporter.otlp.metrics.default.histogram.aggregation.max.buckets Optimizations in line for the next iteration: - Prepopulate the additional dimensions rather than populating it during record() - Transformer for the metric/dimension names rather than just predefined formats - Revisit the structuring of MetricEntityState to not have to do a lookup of tehuti metric everytime record() is called - Revisit otel histogram default maxScale and maxBuckets config - Skip or Noop for otel record() for pre aggregations in code. For instance: if storeName is total or total.<clusterName>
- Loading branch information
1 parent
cc6e3db
commit ce23e38
Showing
76 changed files
with
3,139 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.