From dd430b4f3e4e1fb21d298a5f401813283f950726 Mon Sep 17 00:00:00 2001 From: Hasit Mistry Date: Fri, 4 Nov 2022 15:52:52 -0700 Subject: [PATCH] Fix metrics docs (#897) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Description of change ##### Checklist - [ ] Tested in playground or other setup - [x] Documentation is changed or added - [ ] Tests and/or benchmarks are included - [ ] Breaking changes - - - This change is [Reviewable](https://reviewable.io/reviews/fluxninja/aperture/897) --- .../concepts/flow-control/flow-label.md | 10 +- .../references/flow-events/_category_.yaml | 8 -- .../references/flow-events/flow-events.md | 131 +++++++++--------- .../references/metrics/_category_.yaml | 8 -- .../prometheus-metrics/_category_.yaml | 8 ++ .../{metrics => prometheus-metrics}/agent.md | 2 + .../{metrics => prometheus-metrics}/common.md | 2 + .../controller.md | 2 + 8 files changed, 87 insertions(+), 84 deletions(-) delete mode 100644 docs/content/references/flow-events/_category_.yaml delete mode 100644 docs/content/references/metrics/_category_.yaml create mode 100644 docs/content/references/prometheus-metrics/_category_.yaml rename docs/content/references/{metrics => prometheus-metrics}/agent.md (99%) rename docs/content/references/{metrics => prometheus-metrics}/common.md (97%) rename docs/content/references/{metrics => prometheus-metrics}/controller.md (96%) diff --git a/docs/content/concepts/flow-control/flow-label.md b/docs/content/concepts/flow-control/flow-label.md index 5c77fb4db6..670b2e7a0c 100644 --- a/docs/content/concepts/flow-control/flow-label.md +++ b/docs/content/concepts/flow-control/flow-label.md @@ -97,9 +97,9 @@ high-cardinality label is detected, some of its values may be replaced with #### Default labels -These are protocol-level labels (e.g. http, network) extracted by the -configurated service mesh/middleware and are available to be referenced in -[Selectors][selector], execept for a few high-cardinality ones. +These are protocol-level labels (e.g. http, network) extracted by the configured +service mesh/middleware and are available to be referenced in +[Selectors][selector], except for a few high-cardinality ones. #### Labels extracted from baggage @@ -113,8 +113,8 @@ SDK][aperture-go]. :::note -In the case of a clash, the Flow Label generated from the source takes -predendence over the source below it: +In the case of a clash, the Flow Label will be applied in the following +precedence over: 1. User-defined 2. Baggage diff --git a/docs/content/references/flow-events/_category_.yaml b/docs/content/references/flow-events/_category_.yaml deleted file mode 100644 index fbead4fc3f..0000000000 --- a/docs/content/references/flow-events/_category_.yaml +++ /dev/null @@ -1,8 +0,0 @@ -label: Flow Events -position: 4 -collapsible: true -collapsed: true -link: - type: "generated-index" - title: "Flow Events" - keywords: ["flow", "events", "olap"] diff --git a/docs/content/references/flow-events/flow-events.md b/docs/content/references/flow-events/flow-events.md index 3bb032f6ef..35869e9647 100644 --- a/docs/content/references/flow-events/flow-events.md +++ b/docs/content/references/flow-events/flow-events.md @@ -1,80 +1,85 @@ --- -title: Flow Events +title: Flow OLAP sidebar_position: 1 -sidebar_label: Flow Events +sidebar_label: Flow OLAP --- +Aperture Agents emit an Opentelemetry stream that can be mapped to an OLAP +database like Druid. This data can be visualized in FluxNinja Cloud. + ## Dimension Columns ### Common -| Name | Type | Example Values | Description | Flow Control Integrations | -| -------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------------------------- | -| aperture.source | | sdk, envoy | Aperture Flow source | SDKs, Envoy | -| workload_duration_ms | | 52 | Duration of the workload in ms | SDKs, Envoy | -| flow_duration_ms | | 52 | Duration of the flow in ms | SDKs, Envoy | -| aperture_processing_duration_ms | | 52 | Aperture's processing duration in ms | SDKs, Envoy | -| aperture.decision_type | | DECISION_TYPE_ACCEPTED, DECISION_TYPE_REJECTED | Decision type taken by policy | SDKs, Envoy | -| aperture.error | | ERROR_NONE, ERROR_MISSING_TRAFFIC_DIRECTION, ERROR_INVALID_TRAFFIC_DIRECTION, ERROR_CONVERT_TO_MAP_STRUCT, ERROR_CONVERT_TO_REGO_AST, ERROR_CLASSIFY | Error reason of the decision taken by policy | SDKs, Envoy | -| aperture.reject_reason | | REJECT_REASON_NONE, REJECT_REASON_RATE_LIMITED, REJECT_REASON_CONCURRENCY_LIMITED | Reject reason of the decision taken by policy | SDKs, Envoy | -| aperture.rate_limiters | | policy_name:service1-demo-app,component_index:18,policy_hash:5kZjjSgDAtGWmLnDT67SmQhZdHVmz0+GvKcOGTfWMVo= | Rate limiters matched to the traffic | SDKs, Envoy | -| aperture.dropping_rate_limiters | | policy_name:service1-demo-app,component_index:18,policy_hash:5kZjjSgDAtGWmLnDT67SmQhZdHVmz0+GvKcOGTfWMVo= | Rate limiters dropping the traffic | SDKs, Envoy | -| aperture.concurrency_limiters | | policy_name:service1-demo-app,component_index:13,policy_hash:5kZjjSgDAtGWmLnDT67SmQhZdHVmz0+GvKcOGTfWMVo= | Concurrency limiters matched to the traffic | SDKs, Envoy | -| aperture.dropping_concurrency_limiters | | policy_name:service1-demo-app,component_index:13,policy_hash:5kZjjSgDAtGWmLnDT67SmQhZdHVmz0+GvKcOGTfWMVo= | Concurrency limiters dropping the traffic | SDKs, Envoy | -| aperture.workloads | | policy_name:service1-demo-app,component_index:13,workload_index:0,policy_hash:5kZjjSgDAtGWmLnDT67SmQhZdHVmz0+GvKcOGTfWMVo= | Workloads matched to the traffic | SDKs, Envoy | -| aperture.dropping_workloads | | policy_name:service1-demo-app,component_index:13,workload_index:0,policy_hash:5kZjjSgDAtGWmLnDT67SmQhZdHVmz0+GvKcOGTfWMVo= | Workloads dropping the traffic | SDKs, Envoy | -| aperture.flux_meters | | service1-demo-app | Flux Meters matched to the traffic | SDKs, Envoy | -| aperture.flow_label_keys | | http.host, http.method, http.request.header.content_length | Flow labels matched to the traffic | SDKs, Envoy | -| aperture.classifiers | | policy_name:service1-demo-app,classifier_index:0 | Classifiers matched to the traffic | SDKs, Envoy | -| aperture.classifier_errors | | | Encountered classifier errors for specified policy | SDKs, Envoy | -| aperture.services | | service1-demo-app.demoapp.svc.cluster.local, service2-demo-app.demoapp.svc.cluster.local | Services to which metrics refer | SDKs, Envoy | -| aperture.control_point | | type:TYPE_INGRESS, type:TYPE_EGRESS | Control point to which metrics refer | SDKs, Envoy | -| aperture.response_status | | OK, Error | Denotes OK or Error across all protocols | SDKs, Envoy | -| response_received | | true, false | Designates whether a response was received | SDKs, envoy | +| Name | Type | Example Values | Description | Flow Control Integrations | +| -------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------------------------- | +| aperture.source | single | sdk, envoy | Aperture Flow source | SDKs, Envoy | +| aperture.decision_type | single | DECISION_TYPE_ACCEPTED, DECISION_TYPE_REJECTED | Decision type taken by policy | SDKs, Envoy | +| aperture.error | single | ERROR_NONE, ERROR_MISSING_TRAFFIC_DIRECTION, ERROR_INVALID_TRAFFIC_DIRECTION, ERROR_CONVERT_TO_MAP_STRUCT, ERROR_CONVERT_TO_REGO_AST, ERROR_CLASSIFY | Error reason of the decision taken by policy | SDKs, Envoy | +| aperture.reject_reason | single | REJECT_REASON_NONE, REJECT_REASON_RATE_LIMITED, REJECT_REASON_CONCURRENCY_LIMITED | Reject reason of the decision taken by policy | SDKs, Envoy | +| aperture.rate_limiters | multi-value | "policy_name:s1, component_index:18, policy_hash:5kZjj" | Rate limiters matched to the traffic | SDKs, Envoy | +| aperture.dropping_rate_limiters | multi-value | "policy_name:s1, component_index:18, policy_hash:5kZjj" | Rate limiters dropping the traffic | SDKs, Envoy | +| aperture.concurrency_limiters | multi-value | "policy_name:s1, component_index:13, policy_hash:5kZjj" | Concurrency limiters matched to the traffic | SDKs, Envoy | +| aperture.dropping_concurrency_limiters | multi-value | "policy_name:s1, component_index:13, policy_hash:5kZjj" | Concurrency limiters dropping the traffic | SDKs, Envoy | +| aperture.workloads | multi-value | "policy_name:s1, component_index:13, workload_index:0, policy_hash:5kZjj" | Workloads matched to the traffic | SDKs, Envoy | +| aperture.dropping_workloads | multi-value | "policy_name:s1, component_index:13, workload_index:0, policy_hash:5kZjj" | Workloads dropping the traffic | SDKs, Envoy | +| aperture.flux_meters | multi-value | s1 | Flux Meters matched to the traffic | SDKs, Envoy | +| aperture.flow_label_keys | multi-value | http.host, http.method, http.request.header.content_length | Flow labels matched to the traffic | SDKs, Envoy | +| aperture.classifiers | multi-value | "policy_name:s1, classifier_index:0" | Classifiers matched to the traffic | SDKs, Envoy | +| aperture.classifier_errors | multi-value | "[ERROR_NONE, ERROR_EVAL_FAILED, ERROR_EMPTY_RESULTSET, ERROR_AMBIGUOUS_RESULTSET, ERROR_MULTI_EXPRESSION, ERROR_EXPRESSION_NOT_MAP], policy_name:s1, classifier_index:0" | Encountered classifier errors for specified policy | SDKs, Envoy | +| aperture.services | multi-value | s1.demoapp.svc.cluster.local, s2.demoapp.svc.cluster.local | Services to which metrics refer | SDKs, Envoy | +| aperture.control_point | single | type:TYPE_INGRESS, type:TYPE_EGRESS | Control point to which metrics refer | SDKs, Envoy | +| aperture.response_status | single | OK, Error | Denotes OK or Error across all protocols | SDKs, Envoy | +| response_received | single | true, false | Designates whether a response was received | SDKs, envoy | ### HTTP -| Name | Type | Example Values | Description | Flow Control Integrations | -| ---------------------------- | ---- | ---------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------- | -| http.status_code | | 200, 429, 503 | HTTP status code of the response | Envoy | -| http.request_content_length | | 0, 53 | Length of the HTTP request content in bytes | Envoy | -| http.response_content_length | | 201, 77 | Length of the HTTP response content in bytes | Envoy | -| http.method | | GET, POST | HTTP method of the response | Envoy | -| http.target | | /request | Target endpoint of the response | Envoy | -| http.host | | service1-demo-app.demoapp.svc.cluster.local, service2-demo-app.demoapp.svc.cluster.local | Host address of the response | Envoy | -| http.scheme | | http | HTTP scheme of the response | Envoy | -| http.flavor | | 1.1 | HTTP protocol version | Envoy | +| Name | Type | Example Values | Description | Flow Control Integrations | +| ---------------------------- | ------ | ---------------------------------------------------------- | ------------------------------------------------------ | ------------------------- | +| http.status_code | single | 200, 429, 503 | HTTP status code of the response | Envoy | +| http.request_content_length | single | 0, 53 | Length of the HTTP request content in bytes | Envoy | +| http.response_content_length | single | 201, 77 | Length of the HTTP response content in bytes | Envoy | +| http.method | single | GET, POST | HTTP method of the response | Envoy | +| http.target | single | /request | Target endpoint of the response | Envoy | +| http.host | single | s1.demoapp.svc.cluster.local, s2.demoapp.svc.cluster.local | Host address of the response | Envoy | +| http.scheme | single | http | HTTP scheme of the response | Envoy | +| http.flavor | single | 1.1 | HTTP protocol version | Envoy | +| {user-defined-labels} | | | Configured through [Flow Classifiers][flowclassifiers] | Envoy | ### SDK -| Name | Type | Example Values | Description | Flow Control Integrations | -| ----------------------- | ---- | -------------- | --------------------- | ------------------------- | -| aperture.feature.status | | OK, Error | Status of the feature | SDKs | +| Name | Type | Example Values | Description | Flow Control Integrations | +| ----------------------- | ------ | -------------- | ------------------------------------------------ | ------------------------- | +| aperture.feature.status | single | OK, Error | Status of the feature | SDKs | +| {user-defined-labels} | | | Explicitly passed through FlowStart call in SDKs | SDKs | ## Metric Columns -| Name | Type | Unit | Description | -| -------------------------------------------- | ----- | ----- | ----------------------------------------------------- | -| workload_duration_ms_sum | float | ms | Sum of duration of the workload | -| workload_duration_ms_min | float | ms | Min of duration of the workload | -| workload_duration_ms_max | float | ms | Max of duration of the workload | -| workload_duration_ms_sumOfSquares | float | ms | Sum of squares of duration of the workload | -| workload_duration_ms_datasketch | float | ms | Datasktech of Duration of the workload | -| flow_duration_ms_sum | float | ms | Sum of duration of the flow | -| flow_duration_ms_min | float | ms | Min of duration of the flow | -| flow_duration_ms_max | float | ms | Max of duration of the flow | -| flow_duration_ms_sumOfSquares | float | ms | Sum of squares of duration of the flow | -| flow_duration_ms_datasketch | float | ms | Datasktech of duration of the flow | -| aperture_processing_duration_ms_sum | float | ms | Sum of Aperture's processing duration | -| aperture_processing_duration_ms_min | float | ms | Min of Aperture's processing duration | -| aperture_processing_duration_ms_max | float | ms | Max of Aperture's processing duration | -| aperture_processing_duration_ms_sumOfSquares | float | ms | Sum of squares of Aperture's processing duration | -| aperture_processing_duration_ms_datasketch | float | ms | Datasktech of Aperture's processing duration | -| http.request_content_length_sum | int | bytes | Sum of length of the HTTP request content | -| http.request_content_length_min | int | bytes | Min of length of the HTTP request content | -| http.request_content_length_max | int | bytes | Max of length of the HTTP request content | -| http.request_content_length_sumOfSquares | int | bytes | Sum of squares of length of the HTTP request content | -| http.response_content_length_sum | int | bytes | Sum of length of the HTTP response content | -| http.response_content_length_min | int | bytes | Min of length of the HTTP response content | -| http.response_content_length_max | int | bytes | Max of length of the HTTP response content | -| http.response_content_length_sumOfSquares | int | bytes | Sum of squares of length of the HTTP response content | +| Name | Type | Unit | Description | +| -------------------------------------------- | ----------------------- | ----- | ----------------------------------------------------- | +| workload_duration_ms_sum | float | ms | Sum of duration of the workload | +| workload_duration_ms_min | float | ms | Min of duration of the workload | +| workload_duration_ms_max | float | ms | Max of duration of the workload | +| workload_duration_ms_sumOfSquares | float | ms | Sum of squares of duration of the workload | +| workload_duration_ms_datasketch | [quantilesDoubleSketch] | ms | Datasktech of Duration of the workload | +| flow_duration_ms_sum | float | ms | Sum of duration of the flow | +| flow_duration_ms_min | float | ms | Min of duration of the flow | +| flow_duration_ms_max | float | ms | Max of duration of the flow | +| flow_duration_ms_sumOfSquares | float | ms | Sum of squares of duration of the flow | +| flow_duration_ms_datasketch | [quantilesDoubleSketch] | ms | Sum of Aperture's processing duration | +| aperture_processing_duration_ms_min | float | ms | Min of Aperture's processing duration | +| aperture_processing_duration_ms_max | float | ms | Max of Aperture's processing duration | +| aperture_processing_duration_ms_sumOfSquares | float | ms | Sum of squares of Aperture's processing duration | +| aperture_processing_duration_ms_datasketch | [quantilesDoubleSketch] | ms | Datasktech of Aperture's processing duration | +| http.request_content_length_sum | int | bytes | Sum of length of the HTTP request content | +| http.request_content_length_min | int | bytes | Min of length of the HTTP request content | +| http.request_content_length_max | int | bytes | Max of length of the HTTP request content | +| http.request_content_length_sumOfSquares | int | bytes | Sum of squares of length of the HTTP request content | +| http.response_content_length_sum | int | bytes | Sum of length of the HTTP response content | +| http.response_content_length_min | int | bytes | Min of length of the HTTP response content | +| http.response_content_length_max | int | bytes | Max of length of the HTTP response content | +| http.response_content_length_sumOfSquares | int | bytes | Sum of squares of length of the HTTP response content | + +[quantilesdoublesketch]: + https://druid.apache.org/docs/latest/development/extensions-core/datasketches-quantiles.html +[flowclassifiers]: ../../concepts/flow-control/flow-classifier.md diff --git a/docs/content/references/metrics/_category_.yaml b/docs/content/references/metrics/_category_.yaml deleted file mode 100644 index 8726c57442..0000000000 --- a/docs/content/references/metrics/_category_.yaml +++ /dev/null @@ -1,8 +0,0 @@ -label: Metrics -position: 3 -collapsible: true -collapsed: true -link: - type: "generated-index" - title: "Metrics" - keywords: ["metrics"] diff --git a/docs/content/references/prometheus-metrics/_category_.yaml b/docs/content/references/prometheus-metrics/_category_.yaml new file mode 100644 index 0000000000..739b9e130d --- /dev/null +++ b/docs/content/references/prometheus-metrics/_category_.yaml @@ -0,0 +1,8 @@ +label: Prometheus Metrics +position: 3 +collapsible: true +collapsed: true +link: + type: "generated-index" + title: "Prometheus Metrics" + keywords: ["prometheus", "metrics"] diff --git a/docs/content/references/metrics/agent.md b/docs/content/references/prometheus-metrics/agent.md similarity index 99% rename from docs/content/references/metrics/agent.md rename to docs/content/references/prometheus-metrics/agent.md index 8af15d17e0..665f4ba3dd 100644 --- a/docs/content/references/metrics/agent.md +++ b/docs/content/references/prometheus-metrics/agent.md @@ -4,6 +4,8 @@ sidebar_position: 2 sidebar_label: Agent --- +Prometheus metrics generated by Aperture Agents. + ## FluxMeter ### Metrics diff --git a/docs/content/references/metrics/common.md b/docs/content/references/prometheus-metrics/common.md similarity index 97% rename from docs/content/references/metrics/common.md rename to docs/content/references/prometheus-metrics/common.md index 2c76dad187..9364a552f4 100644 --- a/docs/content/references/metrics/common.md +++ b/docs/content/references/prometheus-metrics/common.md @@ -4,6 +4,8 @@ sidebar_position: 1 sidebar_label: System --- +Prometheus metrics generated by both, Aperture Agents and Aperture Controller. + ## Go Metrics Go process metrics can be exposed by enabling `enable_go_metrics` flag in diff --git a/docs/content/references/metrics/controller.md b/docs/content/references/prometheus-metrics/controller.md similarity index 96% rename from docs/content/references/metrics/controller.md rename to docs/content/references/prometheus-metrics/controller.md index 3e3e269ce1..efd00bfd6e 100644 --- a/docs/content/references/metrics/controller.md +++ b/docs/content/references/prometheus-metrics/controller.md @@ -4,6 +4,8 @@ sidebar_position: 3 sidebar_label: Controller --- +Prometheus metrics generated by Aperture Controller. + ## Signal ### Metrics