Now, you can monitor your Github Actions with New Relic using Github Actions New Relic Exporter, making it easier to get observability into your CI/CD workflows health and performance.
You will be able to:
Configuring the exporter
Before setting up the integration, you will need a New Relic license/ingest API key.
NEW_RELIC_LICENSE_KEY
GITHUB_TOKEN
has at least read access to the action scope. Alternatively, you can use a Personal Access Token, in this case, configure your PAT token as secret in your repository, called it GHA_TOKEN
Create your workflow yaml with below configuration, under .github/workflows, called it new-relic-exporter.yaml
for example.
Amend env: section according to the token method in use.
GHA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
for automatic token authentication
GHA_TOKEN: ${{ secrets.GHA_TOKEN }}
for PAT token authentication
name: new-relic-exporter
on:
workflow_run:
workflows: ['*']
types: [completed] # defaults to run on every completed workflow run event
env:
GHA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
GHA_RUN_ID: ${{ github.event.workflow_run.id }}
GHA_RUN_NAME: ${{ github.event.workflow_run.name }}
jobs:
new-relic-exporter:
name: new-relic-exporter
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: new-relic-exporter
uses: newrelic-experimental/gha-new-relic-exporter@latest
See example repo here, using this action: https://github.com/khpeet/fy24sko-change-tracking
Traces/Logs are viewable under an OTEL service entity in New Relic, named as your repo:
Each workflow's run/execution steps can be viewed as spans, and logs are also captured, in context:
GHA_DEBUG
as secret in your repository and set it to trueWe encourage your contributions to improve Github Actions New Relic Exporter! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at opensource@newrelic.com.
A note about vulnerabilities
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.
Github Actions New Relic Exporter is licensed under the Apache 2.0 License.
Github Actions New Relic Exporter also use source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.