Metrics


How to export the metrics

Service-Center is compatible with the Prometheus standard. By default, the full metrics can be collected by accessing the /metrics API through the 30100 port.

If you want to customize the metrics configuration.

metrics:
  enable: true # enable to start metrics gather
  interval: 30s # the duration of collection
  exporter: prometheus # use the prometheus exporter
  prometheus:
    # optional, listen another ip-port and path if set, e.g. http://127.0.0.1:80/other
    listenURL:

Summary

FamilyName: service_center

Server

metrictypedescription
http_request_totalcounterThe total number of received service requests.
http_success_totalcounterTotal number of requests responding to status code 2xx or 3xx.
http_request_durations_microsecondssummaryThe latency of http requests.
http_query_per_secondsgaugeTPS of http requests.

Pub/Sub

metrictypedescription
notify_publish_totalcounterThe total number of instance events.
notify_publish_durations_microsecondssummaryThe latency between the event generated in ServiceCenter and received by the client.
notify_pending_totalcounterThe total number of pending instances events.
notify_pending_durations_microsecondssummaryThe latency of pending instances events.
notify_subscriber_totalcounterThe total number of subscriber, e.g. Websocket, gRPC.

Meta

metrictypedescription
db_heartbeat_totalcounterThe total number of received instance heartbeats.
db_heartbeat_durations_microsecondssummaryThe latency of received instance heartbeats.
db_domain_totalcounterThe total number of domains.
db_service_totalcounterThe total number of micro-services.
db_service_usagegaugeThe usage percentage of service quota.
db_instance_totalcounterThe total number of instances.
db_instance_usagegaugeThe usage percentage of instances.
db_schema_totalcounterThe total number of schemas.
db_framework_totalcounterThe total number of SDK frameworks.

Backend

metrictypedescription
db_backend_event_totalcounterThe total number of received backend events, e.g. etcd, Mongo.
db_backend_event_durations_microsecondssummaryThe latency between received backend events and finish to build cache.
db_dispatch_event_totalcounterThe total number of dispatch events to resource handlers.
db_dispatch_event_durations_microsecondssummaryThe latency between received backend events and finish to dispatch.

System

metrictypedescription
db_sc_totalcounterThe total number of ServiceCenter instances.
process_resident_memory_bytes
process_cpu_seconds_total
process_cpu_usage
go_threads
go_goroutines