apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
491 stars 192 forks source link

[Fix #3483] Adding state duration summary #3485

Closed fjtirado closed 2 months ago

fjtirado commented 2 months ago

Fixes https://github.com/apache/incubator-kie-kogito-runtimes/issues/3483 Add "kogito_node_instance_duration_milliseconds" distribution summary. Different to the other two summaries, times are collected in milliseconds rather than seconds

elguardian commented 2 months ago

@fjtirado IMO we should record also the number this node has been executed. The reason is because you can calculate the mean (duration) / hits = average so we have an idea of the duration of the node.... min max would be interesting as well.

fjtirado commented 2 months ago

@fjtirado IMO we should record also the number this node has been executed. The reason is because you can calculate the mean (duration) / hits = average so we have an idea of the duration of the node.... min max would be interesting as well.

@elguardian I think this is automatically done by the Distribution summary micrometer. This is an example of what is sent to the elastic search for the proccess instances distribution summary {"@timestamp":"2024-04-22T11:07:47.845Z","name":"kogito_process_instance_duration_seconds","type":"distribution_summary","app_id":"default-process-monitoring-listener","artifactId":"serverless-workflow-expression-quarkus","process_id":"division","version":"1.0-SNAPSHOT","count":1,"sum":0.061,"mean":0.061,"max":0.061}