From d0b89003279dd74514efb64102beae9e80603a21 Mon Sep 17 00:00:00 2001 From: Laurent Broudoux Date: Thu, 13 Jun 2024 17:47:42 +0200 Subject: [PATCH] chore: #124 Migrate monitoring related documentation Signed-off-by: Laurent Broudoux --- .../documentation/archive/using/monitoring.md | 60 ------------------- .../documentation/explanations/monitoring.md | 54 ++++++++++++++++- 2 files changed, 52 insertions(+), 62 deletions(-) delete mode 100644 content/documentation/archive/using/monitoring.md diff --git a/content/documentation/archive/using/monitoring.md b/content/documentation/archive/using/monitoring.md deleted file mode 100644 index 3fb84135..00000000 --- a/content/documentation/archive/using/monitoring.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -draft: false -title: "Monitoring & Observability" -date: 2022-09-09 -publishdate: 2022-09-09 -lastmod: 2024-04-27 -weight: 20 ---- - -## Introduction - -As a cloud-native application, we take great care of providing observability on what's going on within a Microcks instance. We dissociate two kinds of metrics: the **Functional metrics** are related to all the domain objects you may find in Microcks and the **Technical metrics** that are related to resource consumption and performance. - -## Functional metrics - -Microcks provides functional metrics directly from within [its own API](../../automating/api). This API will give you visibility on how you use the platform to invoke mocks, execute tests and enhance or degrade quality metrics. The endpoints of the API are returning JSON data. - -Three categories of endpoints are available: - -* `/api/metrics/conformance/*` for querying/collecting the metrics related to the Test Conformance of the API | Services of your repository - see [Conformance metrics](../tests/#conformance-metrics), -* `/api/metrics/invocations/*` for querying the metrics related to mocks invocations (daily/hourly invocations, by API | Service or aggregated), -* `/api/metrics/tests/*` for aggregated metrics on tests executed on the platform - -Have a look at [Microcks API](../../automating/api) to get detailed on how to use those endpoints. - -## Technical metrics - -For Technical metrics, Microcks components expose [Prometheus](https://prometheus.io) endpoints that can be scraped to collect technical metrics. That way you ca neasily integrate Microcks monitoring into any modern monitoring stack with [Alert Manager](https://prometheus.io/docs/alerting/latest/alertmanager/) or [Grafana](https://grafana.com/grafana/). - -Two different endpoints are available: - -* `/actuator/prometheus` path for the main webapp component, -* `/q/metrics` path for async-minion component - -From those endpoints, you will be able to collect resource consumption or perfromance metrics such as: JVM memory used, JVM thread pools, HTTP endpoints performance, Database queries performance and so on. - -## OpenTelemetry support - -Starting with Microcks `1.9.0`, the main webapp component now supports [OpenTelemetry](https://opentelemetry.io/) instrumention for logs, distributed tracing and metrics. - -OpenTelemetry is disabled by default and must be enabled using two different environment variables: - -* `OTEL_JAVAAGENT_ENABLED` is set to false by default, so you'll have to explicitly set it to `true` -* `OTEL_EXPORTER_OTLP_ENDPOINT` is set to a local dummy endpoint, so you'll have to set it to an OpenTelemetry collector endpoint of your environment. Something like `http://otel-collector.acme.com:4317` for example. - -Check the dedicated [README](https://github.com/microcks/microcks/tree/1.9.x/observability) on GitHub to get more details. - -## Grafana dashboard - -Starting with Microcks `1.9.0`, we also provide a [Grafana](https://grafana.com/) dashbaord that allows you to easily track the performance and health status of your Microcks instance. - -This dashboard is using data coming from a Prometheus source so you don't have to enabled the full OpenTelemetry support to use it. Standard Prometheus endpoints scraped by your Prom instance will do the job. - -Check the dedicated [/dashbaords](https://github.com/microcks/microcks/tree/1.9.x/observability/dashboards) on GitHub to get more details. - -## Benchmark suite - -Starting with Microcks `1.9.0`, we also provide a benchmark suite as an easy way of validating/sizing/evaluating changes on your Microcks instance. It allows you to simulate Virtual Users on different usage scenarios and gather performance metrics of your instance. - -Check the dedicated [README](https://github.com/microcks/microcks/tree/1.9.x/benchmark) on GitHub to get more details. \ No newline at end of file diff --git a/content/documentation/explanations/monitoring.md b/content/documentation/explanations/monitoring.md index 04611568..2d898c0d 100644 --- a/content/documentation/explanations/monitoring.md +++ b/content/documentation/explanations/monitoring.md @@ -3,8 +3,58 @@ draft: false title: "Monitoring & Observability" date: 2022-09-09 publishdate: 2022-09-09 -lastmod: 2024-04-27 +lastmod: 2024-06-13 weight: 20 --- -TODO \ No newline at end of file +## Introduction + +As a cloud-native application, we take great care of providing observability on what's going on within a Microcks instance. We dissociate two kinds of metrics: the **Functional metrics** are related to all the domain objects you may find in Microcks and the **Technical metrics** that are related to resource consumption and performance. + +## Functional metrics + +Microcks provides functional metrics directly from within [its own REST API](/documentation/references/apis/open-api). This API will give you visibility on how you use the platform to invoke mocks, execute tests and enhance or degrade quality metrics. The endpoints of the API are returning JSON data. + +Three categories of endpoints are available: + +* `/api/metrics/conformance/*` for querying/collecting the metrics related to the Test Conformance of the API | Services of your repository - see [Conformance metrics](/documentation/explanations/conformance-testing/#conformance-metrics), +* `/api/metrics/invocations/*` for querying the metrics related to mocks invocations (daily/hourly invocations, by API | Service or aggregated), +* `/api/metrics/tests/*` for aggregated metrics on tests executed on the platform + +Have a look at [Connecting Microcks API](/documentation/guides/automation/api) and [REST API reference](/documentation/references/apis/open-api) reference to get detailed on how to use those endpoints. + +## Technical metrics + +For Technical metrics, Microcks components expose [Prometheus](https://prometheus.io) endpoints that can be scraped to collect technical metrics. That way you ca neasily integrate Microcks monitoring into any modern monitoring stack with [Alert Manager](https://prometheus.io/docs/alerting/latest/alertmanager/) or [Grafana](https://grafana.com/grafana/). + +Two different endpoints are available: + +* `/actuator/prometheus` path for the main webapp component, +* `/q/metrics` path for async-minion component + +From those endpoints, you will be able to collect resource consumption or perfromance metrics such as: JVM memory used, JVM thread pools, HTTP endpoints performance, Database queries performance and so on. + +## OpenTelemetry support + +Starting with Microcks `1.9.0`, the main webapp component now supports [OpenTelemetry](https://opentelemetry.io/) instrumention for logs, distributed tracing and metrics. + +OpenTelemetry is disabled by default and must be enabled using two different environment variables: + +* `OTEL_JAVAAGENT_ENABLED` is set to false by default, so you'll have to explicitly set it to `true` +* `OTEL_EXPORTER_OTLP_ENDPOINT` is set to a local dummy endpoint, so you'll have to set it to an OpenTelemetry collector endpoint of your environment. Something like `http://otel-collector.acme.com:4317` for example. + +Check the dedicated [README](https://github.com/microcks/microcks/tree/1.9.x/observability) on GitHub to get more details. + +## Grafana dashboard + +Starting with Microcks `1.9.0`, we also provide a [Grafana](https://grafana.com/) dashbaord that allows you to easily track the performance and health status of your Microcks instance. + +This dashboard is using data coming from a Prometheus source so you don't have to enabled the full OpenTelemetry support to use it. Standard Prometheus endpoints scraped by your Prom instance will do the job. + +Check the dedicated [/dashbaords](https://github.com/microcks/microcks/tree/1.9.x/observability/dashboards) on GitHub to get more details. + +## Benchmark suite + +Starting with Microcks `1.9.0`, we also provide a benchmark suite as an easy way of validating/sizing/evaluating changes on your Microcks instance. It allows you to simulate Virtual Users on different usage scenarios and gather performance metrics of your instance. + +Check the dedicated [README](https://github.com/microcks/microcks/tree/1.9.x/benchmark) on GitHub to get more details. \ No newline at end of file