Skip to main content

Metric Categories

Apinizer Gateway metrics are divided into four main categories:

API Traffic Metrics

Provides detailed information about API requests, success/error rates, response times, and sizes.

External Connection Metrics

Provides information about requests made to external services, success/error rates, and response times.

Cache Metrics

Provides information about cache operations, success/error rates, and response times.

JVM Metrics

Provides information about memory usage, GC, thread status, and processor usage.

Metric Formats

Each metric is collected in two formats:

General Metric

Total values without labels. For example, total number of all API requests.

Tagged Metric

Metrics enriched with labels for detailed analysis. For example, requests by API ID.

Prometheus Metric Types

Gateway metrics are collected using four basic metric types of Prometheus. These types are designed to best represent different data types and behaviors.
Each metric type serves different purposes depending on how you collect and analyze the data.

Counter

Counter (Counter)

It is a value that only increases. It starts from zero when the application runs and increases, and is reset only when the application is restarted. Counter type metrics are ideal for tracking continuously increasing values such as total request count, error count, or number of completed operations.
Available Operations:
  • sum: The total value itself
  • rate: Calculates the rate of increase over time (such as how much it increases per second)
  • increase: Calculates the total increase in a specific time range

Gauge

Gauge (Gauge)

Represents an instant value. This value can increase, decrease, or remain constant. Gauge type metrics are used to monitor an instant state or level such as current memory usage, instant CPU usage, or number of active threads.
Available Operations:
  • sum: Sum of Gauge values grouped by labels
  • mean: Average of Gauge values grouped by labels
  • min/max: Minimum or maximum of values grouped by labels

Timer

Timer (Timer)

Measures how long an operation takes (usually in milliseconds or seconds). Although technically not a special type in Prometheus, it is a metric created by libraries such as Micrometer with a combination of DistributionSummary and Counter. These metrics provide information such as average duration, maximum duration, and percentile slices.
Available Operations:
  • sum: Gives the total duration
  • count: Gives how many times the operation was performed in total
  • mean: Calculates the average duration of the operation
  • max: Gives the longest duration observed
  • histogram_quantile: Calculates percentile slices

DistributionSummary

DistributionSummary (Distribution Summary)

Used to monitor the distribution of a value. It works similarly to Timer, but instead of measuring time, it measures arbitrary numerical values such as request size, file size. This metric also provides statistical information such as average, maximum, and percentile slices.
Available Operations:
  • sum: Gives the total value
  • count: Gives the number of observed values
  • mean: Calculates the average of values
  • max: Gives the largest value observed
  • histogram_quantile: Calculates percentile slices

API Traffic Metrics

These metrics are used to monitor API requests passing through Apinizer and measure their performance. While total requests, success, error, and cache hit rates are tracked numerically, request processing time and data sizes are measured for performance analysis.
Some metrics are provided with api_id and api_name labels for API-based detailed examination.

General Metrics

Metric NameDescriptionType
apinizer_api_traffic_total_countTotal API traffic requestsCounter
apinizer_api_traffic_success_countSuccessful API requestsCounter
apinizer_api_traffic_error_countFailed API requestsCounter
apinizer_api_traffic_blocked_countBlocked API requestsCounter
apinizer_api_traffic_request_pipeline_timeAPI request pipeline time (ms)Timer
apinizer_api_traffic_routing_timeAPI routing time (ms)Timer
apinizer_api_traffic_response_pipeline_timeAPI response pipeline time (ms)Timer
apinizer_api_traffic_total_timeAPI total time (ms)Timer
apinizer_api_traffic_request_sizeAPI request size (byte)DistributionSummary
apinizer_api_traffic_response_sizeAPI response size (byte)DistributionSummary
apinizer_api_traffic_cache_hits_countAPI cache hit countCounter

Tagged Metrics (api_id, api_name)

Metric NameDescriptionTypeLabels
apinizer_api_traffic_total_count_taggedTotal API traffic requestsCounterapi_id, api_name
apinizer_api_traffic_success_count_taggedSuccessful API requestsCounterapi_id, api_name
apinizer_api_traffic_error_count_taggedFailed API requestsCounterapi_id, api_name
apinizer_api_traffic_blocked_count_taggedBlocked API requestsCounterapi_id, api_name
apinizer_api_traffic_request_pipeline_time_taggedAPI request pipeline time (ms)Timerapi_id, api_name
apinizer_api_traffic_routing_time_taggedAPI routing time (ms)Timerapi_id, api_name
apinizer_api_traffic_response_pipeline_time_taggedAPI response pipeline time (ms)Timerapi_id, api_name
apinizer_api_traffic_total_time_taggedAPI total time (ms)Timerapi_id, api_name
apinizer_api_traffic_request_size_taggedAPI request size (byte)DistributionSummaryapi_id, api_name
apinizer_api_traffic_response_size_taggedAPI response size (byte)DistributionSummaryapi_id, api_name
apinizer_api_traffic_cache_hits_count_taggedAPI cache hit countCounterapi_id, api_name

External Connection Metrics

These metrics are used to monitor external requests made through Apinizer. Performance of external services is analyzed by measuring total requests, error count, and response time.
Some metrics are provided with the url label for URL-based detailed examination.

General Metrics

Metric NameDescriptionType
apinizer_external_requests_total_countTotal external request countCounter
apinizer_external_errors_total_countTotal external error countCounter
apinizer_external_response_timeExternal response time (ms)Timer

Tagged Metrics (url)

Metric NameDescriptionTypeLabels
apinizer_external_requests_total_count_taggedTotal external request countCounterurl
apinizer_external_errors_total_count_taggedTotal external error countCounterurl
apinizer_external_response_time_taggedExternal response time (ms)Timerurl

Cache Metrics

These metrics are used to monitor the interaction of the worker (gateway) pod with cache. How the worker pod performs cache operations and its performance is analyzed by measuring total requests, error count, and response time.
Metric NameDescriptionType
apinizer_cache_requests_total_countTotal cache request countCounter
apinizer_cache_errors_total_countTotal cache error countCounter
apinizer_cache_response_timeCache operation response time (ms)Timer

JVM Metrics

These metrics are used to monitor JVM performance and resource usage in the worker (gateway) pod. They help analyze the system’s efficient operation by providing detailed information about memory, GC (Garbage Collection) activity, and thread status.
Metric NameDescriptionType
jvm_buffer_count_buffersNumber of buffers used by JVMGauge
jvm_buffer_memory_used_bytesTotal buffer memory used (byte)Gauge
jvm_buffer_total_capacity_bytesBuffer total capacity (byte)Gauge
jvm_gc_live_data_size_bytesData size surviving after GC (byte)Gauge
jvm_gc_max_data_size_bytesMaximum data size for GC (byte)Gauge
jvm_gc_memory_allocated_bytes_totalAmount of memory allocated by GC (byte)Counter
jvm_gc_memory_promoted_bytes_totalMemory promoted by GC (byte)Counter
jvm_gc_pause_seconds_countTotal number of GC pausesCounter
jvm_gc_pause_seconds_maxLongest GC pause (seconds)Gauge
jvm_gc_pause_seconds_sumTotal GC pause duration (seconds)Gauge
jvm_memory_used_bytesMemory usage by area (heap/non-heap)Gauge
jvm_memory_committed_bytesCommitted memory by areaGauge
jvm_memory_max_bytesMaximum memory by areaGauge
jvm_threads_live_threadsCurrent number of live threadsGauge
jvm_threads_daemon_threadsCurrent number of daemon threadsGauge
system_cpu_usageCPU usage of main systemGauge
system_cpu_countNumber of available processorsGauge
system_load_average_1mSystem load average (1 minute)Gauge
process_cpu_usageCPU usage of JVM processGauge
process_uptime_secondsRuntime of JVM processGauge
process_files_open_filesNumber of open file descriptorsGauge