From e823bc9fb609b29ccb07281c43bf7daa21699611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hornych?= Date: Mon, 17 Jun 2024 15:48:26 +0200 Subject: [PATCH] docs(#18): metrics and JFR events docs update --- .../user/en/operate/reference/jfr-events.md | 34 +++- .../user/en/operate/reference/metrics.md | 176 ++++++++++++------ 2 files changed, 140 insertions(+), 70 deletions(-) diff --git a/documentation/user/en/operate/reference/jfr-events.md b/documentation/user/en/operate/reference/jfr-events.md index d949b6172..0fa9a3c36 100644 --- a/documentation/user/en/operate/reference/jfr-events.md +++ b/documentation/user/en/operate/reference/jfr-events.md @@ -1,17 +1,10 @@ ### Java Flight Recorder (JFR) Events -#### API / GraphQL / Request +#### API / GraphQL / Instance / Schema
-
evita_engine/src/main/java/io/evitadb/externalApi/graphql/metric/event/request/ExecutedEvent.java GraphQL request executed
-
Event that is fired when a GraphQL request is executed.
-
- -#### API / GraphQL / Schema - -
-
evita_engine/src/main/java/io/evitadb/externalApi/graphql/metric/event/schema/BuiltEvent.java GraphQL schema built
-
Event that is fired when a GraphQL schema is built.
+
evita_engine/src/main/java/io/evitadb/externalApi/graphql/metric/event/instance/BuiltEvent.java GraphQL instance built
+
Event that is fired when a GraphQL instance is built.
#### API / gRPC @@ -30,6 +23,27 @@
Event that is fired when an entire anteroom contents were thrown away.
+#### ExternalAPI / GraphQL / Request + +
+
evita_engine/src/main/java/io/evitadb/externalApi/graphql/metric/event/request/ExecutedEvent.java GraphQL request executed
+
Event that is fired when a GraphQL request is executed.
+
+ +#### ExternalAPI / REST / Instance / Schema + +
+
evita_engine/src/main/java/io/evitadb/externalApi/rest/metric/event/instance/BuiltEvent.java REST API instance built
+
Event that is fired when a REST API instance is built.
+
+ +#### ExternalAPI / REST / Request + +
+
evita_engine/src/main/java/io/evitadb/externalApi/rest/metric/event/request/ExecutedEvent.java REST request executed
+
Event that is fired when a REST request is executed.
+
+ #### Query
diff --git a/documentation/user/en/operate/reference/metrics.md b/documentation/user/en/operate/reference/metrics.md index 91e1068a7..372914800 100644 --- a/documentation/user/en/operate/reference/metrics.md +++ b/documentation/user/en/operate/reference/metrics.md @@ -3,8 +3,18 @@

Labels used in metrics

-
entityType
-
Entity type: N/A
+
buildType
+
Build type: N/A
+
catalogName
+
Catalog: N/A
+
instanceType
+
Instance type: N/A
+
buildType
+
Build type: N/A
+
catalogName
+
Catalog: N/A
+
instanceType
+
Instance type: N/A
fileType
File type: N/A
name
@@ -13,72 +23,113 @@
File type: N/A
name
Logical file name: N/A
+
resolution
+
Transaction resolution: N/A
+
initiator
+
Initiator of the call (client or server): N/A
+
procedureName
+
Name of the procedure that was called: N/A
+
responseState
+
State of the response (OK, ERROR, CANCELED): N/A
+
serviceName
+
Name of the service that was called: N/A
+
entityType
+
Entity type: N/A
+
prefetched
+
Prefetched vs. non-prefetched query: N/A
+
entityType
+
Entity type: N/A
+
catalogName
+
Catalog: N/A
+
instanceType
+
Instance type: N/A
+
operationName
+
GraphQL operation: N/A
+
operationType
+
Operation type: N/A
+
responseStatus
+
Response status: N/A
+
taskName
+
N/A: N/A
fileType
File type: N/A
name
Logical file name: N/A
+
resolution
+
Transaction resolution: N/A
+
stage
+
Transaction stage: N/A
+
entityType
+
Entity type: N/A
fileType
File type: N/A
name
Logical file name: N/A
-
stage
-
Transaction stage: N/A
fileType
File type: N/A
name
Logical file name: N/A
-
catalogName
-
Catalog: N/A
-
instanceType
-
Instance type: N/A
-
operationName
-
GraphQL operation: N/A
-
operationType
-
Operation type: N/A
-
responseStatus
-
Response status: N/A
fileType
File type: N/A
name
Logical file name: N/A
-
buildType
-
Build type: N/A
+
recordType
+
Record type: N/A
catalogName
Catalog: N/A
+
entityType
+
Collection: N/A
+
httpMethod
+
HTTP method: N/A
instanceType
Instance type: N/A
+
operationId
+
Operation ID: N/A
+
operationType
+
Operation type: N/A
+
responseStatus
+
Response status: N/A
fileType
File type: N/A
name
Logical file name: N/A
-
recordType
-
Record type: N/A
-
entityType
-
Entity type: N/A
-
prefetched
-
Prefetched vs. non-prefetched query: N/A
-
initiator
-
Initiator of the call (client or server): N/A
-
procedureName
-
Name of the procedure that was called: N/A
-
responseState
-
State of the response (OK, ERROR, CANCELED): N/A
-
serviceName
-
Name of the service that was called: N/A
-
resolution
-
Transaction resolution: N/A
-
taskName
-
N/A: N/A
-
resolution
-
Transaction resolution: N/A
taskName
N/A: N/A
-
entityType
-
Entity type: N/A
-#### API / GraphQL / Request +#### API / GraphQL / Instance / Schema + +
+
io_evitadb_external_api_graphql_instance_built_instance_build_duration (HISTOGRAM)
+
Duration of build of a single API: N/A

Labels: buildType, catalogName, instanceType
+
io_evitadb_external_api_graphql_instance_built_schema_build_duration (HISTOGRAM)
+
Duration of GraphQL schema build of a single API: N/A

Labels: buildType, catalogName, instanceType
+
io_evitadb_external_api_graphql_instance_built_schema_dsl_lines (GAUGE)
+
Number of lines in built GraphQL schema DSL: N/A

Labels: buildType, catalogName, instanceType
+
io_evitadb_external_api_graphql_instance_built_total (COUNTER)
+
GraphQL instance built total

Labels: buildType, catalogName, instanceType
+
+ +#### API / gRPC + +
+
io_evitadb_api_grpc_procedure_called_duration_milliseconds (HISTOGRAM)
+
gRPC procedure called duration

Labels: initiator, procedureName, responseState, serviceName
+
io_evitadb_api_grpc_procedure_called_total (COUNTER)
+
gRPC procedure called total

Labels: initiator, procedureName, responseState, serviceName
+
+ +#### Cache + +
+
io_evitadb_cache_anteroom_record_statistics_updated_records (GAUGE)
+
Number of records waiting in anteroom: N/A
+
io_evitadb_cache_anteroom_wasted_total (COUNTER)
+
Anteroom wasted total
+
+ +#### ExternalAPI / GraphQL / Request
io_evitadb_external_api_graphql_request_executed_duration_milliseconds (HISTOGRAM)
@@ -105,33 +156,38 @@
Request validation duration in milliseconds: N/A

Labels: catalogName, instanceType, operationName, operationType, responseStatus
-#### API / GraphQL / Schema +#### ExternalAPI / REST / Instance / Schema
-
io_evitadb_external_api_graphql_schema_built_build_duration (HISTOGRAM)
-
Duration of GraphQL schema build of a single API: N/A

Labels: buildType, catalogName, instanceType
-
io_evitadb_external_api_graphql_schema_built_dsl_lines (GAUGE)
-
Number of lines in built GraphQL schema DSL: N/A

Labels: buildType, catalogName, instanceType
-
io_evitadb_external_api_graphql_schema_built_total (COUNTER)
-
GraphQL schema built total

Labels: buildType, catalogName, instanceType
-
- -#### API / gRPC - -
-
io_evitadb_api_grpc_procedure_called_duration_milliseconds (HISTOGRAM)
-
gRPC procedure called duration

Labels: initiator, procedureName, responseState, serviceName
-
io_evitadb_api_grpc_procedure_called_total (COUNTER)
-
gRPC procedure called total

Labels: initiator, procedureName, responseState, serviceName
+
io_evitadb_external_api_rest_instance_built_instance_build_duration (HISTOGRAM)
+
Duration of build of a single REST API: N/A

Labels: buildType, catalogName, instanceType
+
io_evitadb_external_api_rest_instance_built_registered_endpoints (GAUGE)
+
Number of registered endpoints in built OpenAPI schema: N/A

Labels: buildType, catalogName, instanceType
+
io_evitadb_external_api_rest_instance_built_schema_build_duration (HISTOGRAM)
+
Duration of OpenAPI schema build of a single API: N/A

Labels: buildType, catalogName, instanceType
+
io_evitadb_external_api_rest_instance_built_schema_dsl_lines (GAUGE)
+
Number of lines in built OpenAPI schema DSL: N/A

Labels: buildType, catalogName, instanceType
+
io_evitadb_external_api_rest_instance_built_total (COUNTER)
+
REST API instance built total

Labels: buildType, catalogName, instanceType
-#### Cache +#### ExternalAPI / REST / Request
-
io_evitadb_cache_anteroom_record_statistics_updated_records (GAUGE)
-
Number of records waiting in anteroom: N/A
-
io_evitadb_cache_anteroom_wasted_total (COUNTER)
-
Anteroom wasted total
+
io_evitadb_external_api_rest_request_executed_duration_milliseconds (HISTOGRAM)
+
REST request execution duration

Labels: catalogName, entityType, httpMethod, instanceType, operationId, operationType, responseStatus
+
io_evitadb_external_api_rest_request_executed_execution_api_overhead_duration_milliseconds (HISTOGRAM)
+
Overall request execution API overhead duration in milliseconds: N/A

Labels: catalogName, entityType, httpMethod, instanceType, operationId, operationType, responseStatus
+
io_evitadb_external_api_rest_request_executed_input_deserialization_duration_milliseconds (HISTOGRAM)
+
Input deserialization duration in milliseconds: N/A

Labels: catalogName, entityType, httpMethod, instanceType, operationId, operationType, responseStatus
+
io_evitadb_external_api_rest_request_executed_internal_evitadb_input_reconstruction_duration_milliseconds (HISTOGRAM)
+
Duration of all internal evitaDB input (query, mutations, ...) reconstructions in milliseconds: N/A

Labels: catalogName, entityType, httpMethod, instanceType, operationId, operationType, responseStatus
+
io_evitadb_external_api_rest_request_executed_operation_execution_duration_milliseconds (HISTOGRAM)
+
Request operation execution duration in milliseconds: N/A

Labels: catalogName, entityType, httpMethod, instanceType, operationId, operationType, responseStatus
+
io_evitadb_external_api_rest_request_executed_result_serialization_duration_milliseconds (HISTOGRAM)
+
Request result serialization duration in milliseconds: N/A

Labels: catalogName, entityType, httpMethod, instanceType, operationId, operationType, responseStatus
+
io_evitadb_external_api_rest_request_executed_total (COUNTER)
+
REST request executed total

Labels: catalogName, entityType, httpMethod, instanceType, operationId, operationType, responseStatus
#### Query