Metrics
Ingest a batch of sfpowerscripts metrics events into VictoriaMetrics.
Note: Only application tokens (CI/CD pipelines) can actually ingest metrics. User tokens are silently accepted but not processed to simplify client-side logic.
Metric Types:
count: Counter for discrete events (value auto-set to 1). Use for builds, deployments, failures.guage: Point-in-time measurement. Use for pool sizes, queue depths.timers: Duration measurement. Use for build time, deploy duration.
Naming Convention: Use dot notation (e.g., sfpowerscripts.build.duration).
Deduplication: Metrics with identical name and tags are deduplicated within 5-minute windows.
Retention: Metrics are retained for 12 months by default.
Metrics accepted and queued for ingestion
Invalid request body - events array is empty or malformed
Unauthorized - valid access token required
Execute an instant query against VictoriaMetrics using MetricsQL/PromQL syntax.
Query Examples:
sfpowerscripts.build.duration- Get latest valuesum(sfpowerscripts.build.completed)- Aggregate countssfpowerscripts.build.duration{package="core"}- Filter by tagrate(sfpowerscripts.build.completed[1h])- Calculate rate over 1 hour
See MetricsQL documentation for full syntax.
MetricsQL / PromQL query expression
sum(rate(sfp_build_duration_seconds[5m]))Evaluation timestamp (RFC3339 or unix seconds)
1734019200Query timeout (duration), forwarded to VictoriaMetrics
10sQuery result from VictoriaMetrics
Unauthorized
Execute an instant query against VictoriaMetrics using MetricsQL/PromQL syntax.
Query Examples:
sfpowerscripts.build.duration- Get latest valuesum(sfpowerscripts.build.completed)- Aggregate countssfpowerscripts.build.duration{package="core"}- Filter by tagrate(sfpowerscripts.build.completed[1h])- Calculate rate over 1 hour
See MetricsQL documentation for full syntax.
MetricsQL / PromQL query expression
sum(rate(sfp_build_duration_seconds[5m]))Evaluation timestamp (RFC3339 or unix seconds)
1734019200Query timeout (duration), forwarded to VictoriaMetrics
10sQuery result from VictoriaMetrics
Unauthorized
Execute a range query to get metrics over a time period with specified resolution.
Use Cases:
Generate time-series data for charts
Analyze trends over time
Calculate aggregates across time windows
Parameters:
start/end: Time range (RFC3339 or Unix seconds)step: Resolution (e.g.,30s,1m,5m,1h)
Example: Query build durations over the last 24 hours with 1-hour resolution.
MetricsQL / PromQL query expression
sum(rate(sfp_build_duration_seconds[5m]))Range start (RFC3339 or unix seconds)
1734015600Range end (RFC3339 or unix seconds)
1734019200Step / resolution (duration, e.g. 30s, 1m)
30sQuery timeout (duration), forwarded to VictoriaMetrics
10sRange query result with time-series data
Unauthorized
Execute a range query to get metrics over a time period with specified resolution.
Use Cases:
Generate time-series data for charts
Analyze trends over time
Calculate aggregates across time windows
Parameters:
start/end: Time range (RFC3339 or Unix seconds)step: Resolution (e.g.,30s,1m,5m,1h)
Example: Query build durations over the last 24 hours with 1-hour resolution.
MetricsQL / PromQL query expression
sum(rate(sfp_build_duration_seconds[5m]))Range start (RFC3339 or unix seconds)
1734015600Range end (RFC3339 or unix seconds)
1734019200Step / resolution (duration, e.g. 30s, 1m)
30sQuery timeout (duration), forwarded to VictoriaMetrics
10sRange query result with time-series data
Unauthorized
Get all distinct values for a specific label/tag across metrics.
Common Labels:
package: Package namesorg: Org aliasespipeline: Pipeline identifierssfp_metric_type: Metric type (count, guage, timers)__name__: Metric names
Use Cases:
Populate filter dropdowns in dashboards
Discover available dimensions for queries
Optional start time (RFC3339 or unix seconds)
1734015600Optional end time (RFC3339 or unix seconds)
1734019200Optional match[] selectors (repeatable)
List of distinct label values
Unauthorized
Get all distinct values for a specific label/tag across metrics.
Common Labels:
package: Package namesorg: Org aliasespipeline: Pipeline identifierssfp_metric_type: Metric type (count, guage, timers)__name__: Metric names
Use Cases:
Populate filter dropdowns in dashboards
Discover available dimensions for queries
Optional start time (RFC3339 or unix seconds)
1734015600Optional end time (RFC3339 or unix seconds)
1734019200Optional match[] selectors (repeatable)
List of distinct label values
Unauthorized
Last updated