diff --git a/README.md b/README.md index d67d722..7e33b2c 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# execution-metrics \ No newline at end of file +# Ethereum Execution metrics + +Discussion of [execution node metrics](metrics.md) for Prometheus. + +## License + +All code and generated test vectors are public domain under [CC0](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/metrics.md b/metrics.md new file mode 100644 index 0000000..7ff9135 --- /dev/null +++ b/metrics.md @@ -0,0 +1,56 @@ +# Execution chain metrics + +## Introduction + +This specification encodes the behavior of sampling and collection of metrics by execution chain clients. + +This specification is informative, and implementations are not required to implement all recommendations. + +## Metrics + +This section defines a set of metrics to be sampled by execution chain clients. + +### Rationale + +The metrics SHOULD behave under the guidelines set by the [Prometheus documentation](https://prometheus.io/docs/practices/instrumentation/#things-to-watch-out-for). + +### Interop Metrics + +The following are the minimal metrics agreed to be conformed by the various client teams. + +| Name | Metric type | Usage | Sample collection event | +|------|-------------|-------|-------------------------| + +### Engine API Metrics + +The following metrics are proposed to be added to clients for Engine API monitoring. These lists are open for discussion. Each client has the opportunity to contribute to it by suggesting additions or disputing existing metrics. + +#### GetBlobsV2 Metrics + +| Name | Metric type | Usage | Sample collection event | +|---------------------------------------------|---------|---------------------------------------------------------------------------|--------------------------| +| `execution_engine_getblobs_requested_total` | Counter | Number of blobs requested via getBlobsV2 | Invocation of GetBlobsV2 | +| `execution_engine_getblobs_available_total` | Counter | Number of blobs requested via getBlobsV2 that are present in the blobpool | Invocation of GetBlobsV2 | +| `execution_engine_getblobs_hit_total` | Counter | Number of times getBlobsV2 responded with “hit” | Invocation of GetBlobsV2 | +| `execution_engine_getblobs_miss_total` | Counter | Number of times getBlobsV2 responded with “miss” | Invocation of GetBlobsV2 | + +### Additional Metrics + +The following are proposed metrics to be added to clients. This list is _not_ stable and is subject to drastic changes, deletions, and additions. The additional metric list is being +discussed, we are yet to reach consensus. Ideally we would also discuss which of these values need to be counters, guages or histograms. + +| Name | Metric type | Usage | Sample collection event | +|------|-------------|-------|-------------------------| + +### Labels + +The metrics should be collected without labels unless specified. The collection process might add additional labels as metadata regarding the machine and build information. + +## Prometheus metrics collection + +An execution chain client using Prometheus for metrics collection SHOULD conform to the following: + +* Execution chain clients SHOULD configure [Prometheus](https://prometheus.io/) so that it exposes metrics collection over an HTTP port. +* Execution chain clients MAY elect to secure the HTTP endpoint by restricting network access and applying Prometheus security settings, according to Prometheus [best practices](https://prometheus.io/docs/operating/security/). +* Execution chain clients SHOULD allow configuration flags to set the network interface and the port the Prometheus collection endpoint will be served from. +* By default, the Prometheus collection endpoint SHOULD be served from 0.0.0.0:8008. \ No newline at end of file