Skip to content

Send GHA metrics to Datadog #435

Send GHA metrics to Datadog

Send GHA metrics to Datadog #435

name: 'Send GHA metrics to Datadog'
on:
workflow_run:
workflows:
- 'Content Release'
- 'Content release: Dev'
- 'Content release: Staging'
- 'Content release: Prod'
types:
- completed
jobs:
send:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-gov-west-1
# @todo: get Next Build specific API key
- name: Get Datadog api key from Parameter Store
uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest
with:
ssm_parameter: /dsva-vagov/content-build/GHA_CONTENT_BUILD_DATADOG_API_KEY
env_variable_name: GHA_CONTENT_BUILD_DATADOG_API_KEY
- name: Send GitHub Actions metrics to DataDog
uses: int128/datadog-actions-metrics@1211003b807510c6a05df26ab9fbc381276a2c1f # v1.100.0
with:
datadog-api-key: ${{ env.GHA_CONTENT_BUILD_DATADOG_API_KEY }}
collect-job-metrics: true
collect-step-metrics: true
datadog-site: ddog-gov.com