Common Metrics¶
The below sections contain the list of common metrics we expose for Daml services supporting a Prometheus metrics reporter. These may help you to measure the four golden signals.
For the metric types referenced below, see the relevant Prometheus documentation.
gRPC Metrics¶
We expose the below metrics for all gRPC endpoints. These metrics have the following common labels attached:
- grpc_service_name:
- fully qualified name of the gRPC service (e.g.
com.daml.ledger.api.v1.ActiveContractsService
)
- grpc_method_name:
- name of the gRPC method (e.g.
GetActiveContracts
)
- grpc_client_type:
- type of client connection (
unary
orstreaming
)
- grpc_server_type:
- type of server connection (
unary
orstreaming
)
- service:
- Canton service’s name (e.g.
participant
,sequencer
, etc.)
daml_grpc_server_duration_seconds¶
- Description: Distribution of the durations of serving gRPC requests.
- Type: Histogram
daml_grpc_server_messages_sent_total¶
- Description: Total number of gRPC messages sent (on either type of connection).
- Type: Counter
daml_grpc_server_messages_received_total¶
- Description: Total number of gRPC messages received (on either type of connection).
- Type: Counter
daml_grpc_server_started_total¶
- Description: Total number of started gRPC requests (on either type of connection).
- Type: Counter
daml_grpc_server_handled_total¶
- Description: Total number of handled gRPC requests.
- Labels:
- grpc_code: returned gRPC status code for the call (
OK
,CANCELLED
,INVALID_ARGUMENT
, etc.)
- grpc_code: returned gRPC status code for the call (
- Type: Counter
daml_grpc_server_messages_sent_bytes¶
- Description: Distribution of payload sizes in gRPC messages sent (both unary and streaming).
- Type: Histogram
daml_grpc_server_messages_received_bytes¶
- Description: Distribution of payload sizes in gRPC messages received (both unary and streaming).
- Type: Histogram
HTTP Metrics¶
We expose the below metrics for all HTTP endpoints. These metrics have the following common labels attached:
- http_verb:
- HTTP verb used for a given call (e.g.
GET
orPUT
)
- host:
- fully qualified hostname of the HTTP endpoint (e.g.
example.com
)
- path:
- path of the HTTP endpoint (e.g.
/parties/create
)
- service:
- Daml service’s name (
json-api
for the HTTP JSON API Service)
daml_http_requests_duration_seconds¶
- Description: Distribution of the durations of serving HTTP requests.
- Type: Histogram
daml_http_requests_total¶
- Description: Total number of HTTP requests completed.
- Labels:
- http_status: returned HTTP status code for the call
- Type: Counter
daml_http_websocket_messages_received_total¶
- Description: Total number of WebSocket messages received.
- Type: Counter
daml_http_websocket_messages_sent_total¶
- Description: Total number of WebSocket messages sent.
- Type: Counter
daml_http_requests_payload_bytes¶
- Description: Distribution of payload sizes in HTTP requests received.
- Type: Histogram
daml_http_responses_payload_bytes¶
- Description: Distribution of payload sizes in HTTP responses sent.
- Type: Histogram
daml_http_websocket_messages_received_bytes¶
- Description: Distribution of payload sizes in WebSocket messages received.
- Type: Histogram
daml_http_websocket_messages_sent_bytes¶
- Description: Distribution of payload sizes in WebSocket messages sent.
- Type: Histogram