This is an action to send metrics of MagicPod to Datadog.
- name: Run magicpod-datadog-action
uses: chaspy/magicpod-datadog-action@main
with:
magicpod_api_token: ${{ secrets.MAGICPOD_API_TOKEN }}
magicpod_organization_name: ${{ secrets.MAGICPOD_ORGANIZATION_NAME}}
magicpod_project_name: ${{ secrets.MAGICPOD_PROJECT_NAME}}
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
Name | Description | Required |
---|---|---|
DD_API_KEY | Datadog API Key | Yes |
Name | Description | Required | Default |
---|---|---|---|
magicpod_api_token | MagicPod API Token | Yes | |
magicpod_organization_name | MagicPod Organization Name | Yes | |
magicpod_project_name | MagicPod Project Name | Yes | |
magicpod_record_count | count query parameter of BatchRuns API. |
No | 20 |
Name | Description | Type | Unit |
---|---|---|---|
custom.magicpod_datadog_action.batch_run.duration_second |
Time taken to execute the Batch Run. (Difference between finished_at and started_at ) |
Gauge | Second |
custom.magicpod_datadog_action.batch_run.count |
Whether the Batch Run was run or not. always send 1 for started_at. | Gauge | Count |
custom.magicpod_datadog_action.test_case.duration_second |
Time taken to execute each test case. (Difference between finished_at and started_at ) |
Gauge | Second |
custom.magicpod_datadog_action.test_case.count |
Whether the test case was run or not. always send 1 for started_at. | Gauge | Count |
- Batch Runs API:
batch_run_number
,status
,test_setting_name
,organization_name
,project_name
- Batch Run API:
batch_run_number
,status
,test_setting_name
,organization_name
,project_name
,pattern_name
,order
,number
,test_case_name
See API Document for the details. (Models / BatchRun Section)
The action uses GET /v1.0/batch_runs
API.
The Datadog Submit Metrics API cannot accept timestamps more than one hour in the past. Therefore, at least, this job must be run within an hour of the most recent test run. It is recommended to run this job once every 20 minutes, as multiple runs will not duplicate metrics.