mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04:00
106 lines
2.9 KiB
YAML
106 lines
2.9 KiB
YAML
# Semantic convention registry for Prometheus web/HTTP metrics.
|
|
#
|
|
# This file is the source of truth for these metrics.
|
|
# Run `make generate-semconv` to regenerate the Go code.
|
|
|
|
groups:
|
|
# Attribute definitions
|
|
- id: attr.http_handler
|
|
type: attribute_group
|
|
brief: HTTP handler attribute.
|
|
attributes:
|
|
- id: handler
|
|
type: string
|
|
stability: development
|
|
brief: The HTTP handler path.
|
|
examples:
|
|
- /
|
|
- /-/healthy
|
|
- /-/ready
|
|
- /api/v1/query
|
|
|
|
- id: attr.http_code
|
|
type: attribute_group
|
|
brief: HTTP response code attribute.
|
|
attributes:
|
|
- id: code
|
|
type: string
|
|
stability: development
|
|
brief: The HTTP response status code.
|
|
examples:
|
|
- "200"
|
|
- "400"
|
|
- "404"
|
|
- "500"
|
|
|
|
# HTTP metrics
|
|
- id: metric.prometheus_http_request_duration_seconds
|
|
type: metric
|
|
stability: development
|
|
brief: Histogram of latencies for HTTP requests.
|
|
metric_name: prometheus_http_request_duration_seconds
|
|
instrument: histogram
|
|
unit: s
|
|
attributes:
|
|
- ref: handler
|
|
annotations:
|
|
prometheus:
|
|
histogram_type: mixed_histogram
|
|
buckets: [0.1, 0.2, 0.4, 1, 3, 8, 20, 60, 120]
|
|
bucket_factor: 1.1
|
|
max_bucket_number: 100
|
|
min_reset_duration: "1h"
|
|
|
|
- id: metric.prometheus_http_requests_total
|
|
type: metric
|
|
stability: development
|
|
brief: Counter of HTTP requests.
|
|
metric_name: prometheus_http_requests_total
|
|
instrument: counter
|
|
unit: "{request}"
|
|
attributes:
|
|
- ref: handler
|
|
- ref: code
|
|
|
|
- id: metric.prometheus_http_response_size_bytes
|
|
type: metric
|
|
stability: development
|
|
brief: Histogram of response size for HTTP requests.
|
|
metric_name: prometheus_http_response_size_bytes
|
|
instrument: histogram
|
|
unit: By
|
|
attributes:
|
|
- ref: handler
|
|
annotations:
|
|
prometheus:
|
|
histogram_type: classic_histogram
|
|
exponential_buckets:
|
|
start: 100
|
|
factor: 10
|
|
count: 8
|
|
|
|
# Federation metrics
|
|
- id: metric.prometheus_web_federation_errors_total
|
|
type: metric
|
|
stability: development
|
|
brief: Total number of errors that occurred while sending federation responses.
|
|
metric_name: prometheus_web_federation_errors_total
|
|
instrument: counter
|
|
unit: "{error}"
|
|
|
|
- id: metric.prometheus_web_federation_warnings_total
|
|
type: metric
|
|
stability: development
|
|
brief: Total number of warnings that occurred while sending federation responses.
|
|
metric_name: prometheus_web_federation_warnings_total
|
|
instrument: counter
|
|
unit: "{warning}"
|
|
|
|
# Readiness metrics
|
|
- id: metric.prometheus_ready
|
|
type: metric
|
|
stability: development
|
|
brief: Whether Prometheus startup was fully completed and the server is ready for normal operation.
|
|
metric_name: prometheus_ready
|
|
instrument: gauge
|
|
unit: "1"
|