1
0
Fork 0
mirror of https://github.com/imjasonh/gcp-metrics-action synced 2026-07-07 00:22:45 +00:00
gcp-metrics-action/action.yml
Jason Hall a410dbb4ac support custom attributes, add fallback workflow_ref
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-11-11 23:03:43 -05:00

50 lines
1.5 KiB
YAML

name: 'GCP Metrics Exporter'
description: 'Collects GitHub Actions workflow metrics and traces, and exports them to Google Cloud Monitoring and Cloud Trace'
author: '@imjasonh'
branding:
icon: 'activity'
color: 'blue'
inputs:
github-token:
description: 'GitHub token for API access'
required: true
gcp-project-id:
description: 'Google Cloud Project ID where metrics will be exported (defaults to project from service account key)'
required: false
gcp-service-account-key-file:
description: 'Path to Google Cloud service account key JSON file'
required: false
service-name:
description: 'Service name for OpenTelemetry resource attributes'
required: false
default: 'github-actions'
service-namespace:
description: 'Service namespace for OpenTelemetry resource attributes'
required: false
default: 'ci'
metric-prefix:
description: 'Prefix for metric names'
required: false
default: 'github.actions'
fail-on-error:
description: 'Fail the workflow if metrics/traces export fails (default: false)'
required: false
default: 'false'
attributes:
description: 'Additional custom attributes to add to metrics and traces (YAML format: key: value)'
required: false
outputs:
traceparent:
description: 'W3C Trace Context (TRACEPARENT) for creating child spans in subsequent steps'
trace-id:
description: 'OpenTelemetry Trace ID'
span-id:
description: 'Root span ID for this job'
runs:
using: 'node20'
main: 'dist/index.js'
post: 'dist/post/index.js'
post-if: 'always()'