Github Action to send Barecheck metric events to newrelic
Key | Required | Default | Description |
---|---|---|---|
accountId |
yes | - | The account to post test run results to. This could also be a subaccount. |
region |
no | US | The region the account belongs to. Posible Options: US , EU |
insertApiKey |
yes | - | Your New Relic Insert API key. |
metricName |
yes | - | Your Barecheck metric that you would like to receive as an event |
metricValue |
yes | - | Barecheck metric value. |
application |
no | - | Application from where metric sent |
The following example will post barecheck custom events of type Barecheck
to New Relic based on the metric name and value.
Github secrets assumed to be set:
NEW_RELIC_ACCOUNT_ID
- New Relic Account ID to post the event data toNEW_RELIC_INSERT_API_KEY
- Insert API key
name: Send Test New Relic Metric
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Sends New Relic test metric
id: newrelic-metric
uses: barecheck/[email protected]
with:
insertApiKey: ${{ secrets.NEW_RELIC_INSERT_API_KEY }}
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
region: EU
application: "some-app-name"
metricName: "testMetric"
metricValue: 45.6
Data can be queried in New Relic One Chart Builder or with the New Relic CLI via the newrelic nrql query
command:
newrelic nrql query --accountId 12345 --query 'SELECT * from Barecheck'
Dashboard isgreat choice tp combine all your code metrics together. Here is a few examples what you can build with barecheck metrics.
- Code coverage dashboard to know current code coverage in your application
SELECT latest(value) as '%' FROM Barecheck WHERE metric='codeCoverage' SINCE 1 month ago