From 844761776758bb67a445f5965afe82731ace33e4 Mon Sep 17 00:00:00 2001 From: Lenny Goodell Date: Tue, 11 Oct 2022 15:11:11 -0700 Subject: [PATCH] feat: Document new common service metrics (#877) * feat: Document new common service metrics Signed-off-by: Leonard Goodell --- .../configuration/CommonConfiguration.md | 2 +- docs_src/microservices/core/data/Ch-CoreData.md | 6 +++--- docs_src/microservices/core/metadata/Ch-Metadata.md | 11 ++++++++++- docs_src/microservices/general/index.md | 12 +++++++++++- .../support/notifications/Ch-AlertsNotifications.md | 11 +++++++++++ .../microservices/support/scheduler/Ch-Scheduler.md | 10 +++++++++- 6 files changed, 45 insertions(+), 7 deletions(-) diff --git a/docs_src/microservices/configuration/CommonConfiguration.md b/docs_src/microservices/configuration/CommonConfiguration.md index 774c660ccc..21d4076c7d 100644 --- a/docs_src/microservices/configuration/CommonConfiguration.md +++ b/docs_src/microservices/configuration/CommonConfiguration.md @@ -24,7 +24,7 @@ The tables in each of the tabs below document configuration properties that are |---|---|---| |Interval| 30s|The interval in seconds at which to report the metrics currently being collected and enabled. **Value of 0s disables reporting**. | |PublishTopicPrefix|"edgex/telemetry"|The base topic in which to publish (report) metrics currently being collected and enabled. `//` will be added to this base topic prefix.| - |Metrics|``|Boolean map of service metrics that are being collected. The boolean flag for each indicates if the metric is enabled for reporting. i.e. `EventsPersisted = true`. The metric name must match one defined by the service. | + |Metrics|SecuritySecretsRequested = false
SecuritySecretsStored = false
``|Boolean map of service metrics that are being collected. The boolean flag for each indicates if the metric is enabled for reporting. i.e. `EventsPersisted = true`. The metric name must match one defined by the service. | |Tags|``|String map of arbitrary tags to be added to every metric that is reported for the service. i.e. `Gateway="my-iot-gateway"`. The tag names are arbitrary. | !!! edgey "Edgex 2.2/2.3" diff --git a/docs_src/microservices/core/data/Ch-CoreData.md b/docs_src/microservices/core/data/Ch-CoreData.md index a6f990f2a7..dcb6e1d2d0 100644 --- a/docs_src/microservices/core/data/Ch-CoreData.md +++ b/docs_src/microservices/core/data/Ch-CoreData.md @@ -125,11 +125,11 @@ Please refer to the general [Common Configuration documentation](../../configura |Property|Default Value|Description| |---|---|---| |||See `Writable.Telemetry` at [Common Configuration](../../../configuration/CommonConfiguration/#configuration-properties) for the Telemetry configuration common to all services | - |Metrics| EventsPersisted = false ReadingsPersisted = false|Service metrics that Core Data collects. Boolean value indicates if reporting of the metric is enabled.| + |Metrics| EventsPersisted = false
ReadingsPersisted = false
`` |Service metrics that Core Data collects. Boolean value indicates if reporting of the metric is enabled.| |Tags|``|List of arbitrary service level tags to included with every metric that is reported. i.e. `Gateway="my-iot-gateway"` | - !!! edgey "Edgex 2.2" - For EdgeX 2.2 Collecting of the `EventsPersisted` and `ReadingsPersisted` Core Data Service Metrics have been added. + !!! edgey "Edgex 2.2/2.3" + For EdgeX 2.2 Collecting of the `EventsPersisted` and `ReadingsPersisted` Core Data Service Metrics have been added.Some common service metrics have been added in 2.3 === "Databases/Databases.Primary" |Property|Default Value|Description| diff --git a/docs_src/microservices/core/metadata/Ch-Metadata.md b/docs_src/microservices/core/metadata/Ch-Metadata.md index 23383168aa..3b627bd3b1 100644 --- a/docs_src/microservices/core/metadata/Ch-Metadata.md +++ b/docs_src/microservices/core/metadata/Ch-Metadata.md @@ -346,12 +346,21 @@ Sequence diagrams for some of the more critical or complex events regarding meta Please refer to the general [Common Configuration documentation](../../configuration/CommonConfiguration.md) for configuration properties common to all services. Below are only the additional settings and sections that are not common to all EdgeX Services. !!! edgey - "EdgeX 2.3" - **RequireMessageBus**, **MessageQueue**, **Writable.UoM** and **UoM** configuration are new in EdgeX 2.3 + **RequireMessageBus**, **Writable.Telemetry*, **MessageQueue**, **Writable.UoM** and **UoM** configuration are new in EdgeX 2.3 === "General" |Property|Default Value|Description| |---|---|---| |RequireMessageBus|true|Required for backwards compatibility. Will be removed in next major release| +=== "Writable.Telemetry" + |Property|Default Value|Description| + |---|---|---| + |||See `Writable.Telemetry` at [Common Configuration](../../../configuration/CommonConfiguration/#configuration-properties) for the Telemetry configuration common to all services | + |Metrics| `` |Service metrics that Core Metadata collects. Boolean value indicates if reporting of the metric is enabled.| + |Tags|``|List of arbitrary service level tags to included with every metric that is reported. i.e. `Gateway="my-iot-gateway"` | + + !!! edgey "Edgex 2.3" + For EdgeX 2.3 Collecting of the some common service metrics has been added. See [Common Configuration](../../../configuration/CommonConfiguration/#configuration-properties) for more details. === "Writable.ProfileChange" |Property|Default Value|Description| |---|---|---| diff --git a/docs_src/microservices/general/index.md b/docs_src/microservices/general/index.md index 2f415fcbfb..f52b55c874 100644 --- a/docs_src/microservices/general/index.md +++ b/docs_src/microservices/general/index.md @@ -34,7 +34,7 @@ If the Event already has `Tags` when it arrives at the application service, then !!! edgey "Edgex 2.2/2.3" New for Edgex 2.2 and expanded in Edgex 2.3 -Limited service metrics have been added for the EdgeX 2.2 and 2.3 releases. Currently, only **Core Data**, **Application Services** and **Device Services** are collecting a limit set of service metrics. Additional service metrics will be added to all services in future releases. See `Writable.Telemetry` at [Common Configuration](../configuration/CommonConfiguration/#configuration-properties) for details on configuring the reporting of service metrics. +Service metrics have been added for the EdgeX 2.2 and 2.3 releases. All services now collect [Common Service Metrics](#common-service-metrics), only **Core Data**, **Application Services** and **Device Services** are collecting additional service specific metrics. Additional service metrics will be added to all services in future releases. See `Writable.Telemetry` at [Common Configuration](../configuration/CommonConfiguration/#configuration-properties) for details on configuring the reporting of service metrics. See [Custom Application Service Metrics](../application/AdvancedTopics/#custom-application-service-metrics) for more detail on Application Services capability to collect their own custom service metrics via use of the App SDK API. @@ -78,3 +78,13 @@ This can be accomplished with a custom application service that sets the functio ``` !!! note The service name is added to the tags for every metric reported from each service. Additional tags may be added via the service's Telemetry configuration. See the `Writable.Telemetry` at [Common Configuration](../configuration/CommonConfiguration/#configuration-properties) for more details. A service may also add metric specific tags via code when it collects the individual metrics. + +### Common Service Metrics + +!!! edgey "Edgex 2.3" + Collection of common service metrics for all core/support/application/device services is new in Edgex 2.3. Additional common service metrics will be added in future releases. + +All services now have the ability to collect the following common service metrics + +- **SecuritySecretsRequested** - Count of secrets requested from the service's Secret Store. +- **SecuritySecretsStored** - Count of secret stored to the service's Secret Store. diff --git a/docs_src/microservices/support/notifications/Ch-AlertsNotifications.md b/docs_src/microservices/support/notifications/Ch-AlertsNotifications.md index f8deff7c18..6889d7da38 100644 --- a/docs_src/microservices/support/notifications/Ch-AlertsNotifications.md +++ b/docs_src/microservices/support/notifications/Ch-AlertsNotifications.md @@ -149,6 +149,16 @@ Please refer to the general [Common Configuration documentation](../../configura |ResendInterval|'5s'|Sets the retry interval for attempts to send notifications.| |Writable.InsecureSecrets.SMTP.Secrets username|username@mail.example.com|The email to send alerts and notifications| |Writable.InsecureSecrets.SMTP.Secrets password||The email password| +=== "Writable.Telemetry" + |Property|Default Value|Description| + |---|---|---| + |||See `Writable.Telemetry` at [Common Configuration](../../../configuration/CommonConfiguration/#configuration-properties) for the Telemetry configuration common to all services | + |Metrics| `` |Service metrics that Support Notification collects. Boolean value indicates if reporting of the metric is enabled.| + |Tags|``|List of arbitrary service level tags to included with every metric that is reported. i.e. `Gateway="my-iot-gateway"` | + + !!! edgey "Edgex 2.3" + For EdgeX 2.3 Collecting of the some common service metrics has been added. See [Common Configuration](../../../configuration/CommonConfiguration/#configuration-properties) for more details. + === "Databases/Databases.Primary" |Property|Default Value|Description| |---|---|---| @@ -180,6 +190,7 @@ sign-in security settings through one of the following two methods: Please see the instruction from this [Google official document](https://support.google.com/accounts/answer/6010255?hl=en). + Then, use the following settings for the mail server properties: Smtp Port=25 diff --git a/docs_src/microservices/support/scheduler/Ch-Scheduler.md b/docs_src/microservices/support/scheduler/Ch-Scheduler.md index c5f3df9b06..cd0c3dce27 100644 --- a/docs_src/microservices/support/scheduler/Ch-Scheduler.md +++ b/docs_src/microservices/support/scheduler/Ch-Scheduler.md @@ -91,6 +91,15 @@ See [Interval](https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-schedu Please refer to the general [Configuration documentation](../../configuration/CommonConfiguration.md) for configuration properties common to all services. Below are only the additional settings and sections that are not common to all EdgeX Services. +=== "Writable.Telemetry" + |Property|Default Value|Description| + |---|---|---| + |||See `Writable.Telemetry` at [Common Configuration](../../../configuration/CommonConfiguration/#configuration-properties) for the Telemetry configuration common to all services | + |Metrics| `` |Service metrics that Support Scheduler collects. Boolean value indicates if reporting of the metric is enabled.| + |Tags|``|List of arbitrary service level tags to included with every metric that is reported. i.e. `Gateway="my-iot-gateway"` | + + !!! edgey "Edgex 2.3" + For EdgeX 2.3 Collecting of the some common service metrics has been added. See [Common Configuration](../../../configuration/CommonConfiguration/#configuration-properties) for more details. === "ScheduleIntervalTime" |Property|Default Value|Description| |---|---|---| @@ -115,7 +124,6 @@ Please refer to the general [Configuration documentation](../../configuration/Co |Interval|midnight|run the operation every midnight as specified by the configuration defined interval| - ### V2 Configuration Migration Guide Refer to the [Common Configuration Migration Guide](../../../configuration/V2MigrationCommonConfig) for details on migrating the common configuration sections such as `Service`.