Skip to content

Set up tracing for your pipeline

To further support DORA metrics we use tracing directly in the build pipeline. This will allow you to measure the time it takes for your team to deliver new code to production.

Lead time

The amount of time it takes a commit to get into production

With these metrics you can also get a better view if changes to your pipeline affect the lead time for change.

NAIS automatically collects telemetry data from your pipeline when you use the docker-build-push action to build your Docker image.

The following manual step is required on your part to visualize that data in Grafana; you must export the TELEMETRY environment variable when you deploy.

.github/workflows/main.yml

jobs:
  build_and_deploy:
    steps:
      - uses: actions/checkout@v4
      - name: Build and push Docker image
        uses: nais/docker-build-push@v0
        id: docker-build-push  # make sure this ID matches the step id below
      - name: Deploy to NAIS
        uses: nais/deploy/actions/deploy@v2
        env:
          TELEMETRY: ${{ steps.docker-build-push.outputs.telemetry }}