newrelic-experimental / gha-new-relic-exporter

18 stars 14 forks source link

Missing Service Name #29

Closed mattdavis0351 closed 4 weeks ago

mattdavis0351 commented 4 weeks ago

2024-10-16 18:44:46,139 INFO [job_logger] [(unknown file):0] [trace_id=44fa8af10a437df32451d033533fd734 span_id=0edf4ce056e287cf resource.service.name= trace_sampled=True] - Cleaning up orphan processes

appears the resource.service.name is not being populated and I'm unable to find the traces in New Relic even though the workflow run reports as successful.

Workflow file being used:

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_PRD_LICENSE_KEY }}
  GHA_RUN_ID: ${{ github.event.workflow_run.id }}
  GHA_RUN_NAME: ${{ github.event.workflow_run.name }}
  GHA_DEBUG: "true"

jobs:
  new-relic-exporter:
    name: new-relic-exporter
    runs-on: self-hosted
    if: ${{ always() }}
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: new-relic-exporter
dpacheconr commented 4 weeks ago

The log message you provided is red herring, nothing to worry about

Are you triggering it from another repository or from the same repository?

Works for me when I trigger it from the same repository for example

PS- does take couple minutes to show in New Relic and if its the first time you ran for that repository, it will take longer as NR first has to create entity with repository name

My workflow

You should expect to see under `name: new-relic-exporter

on: workflow_run: workflows: ['*'] types: [completed] # defaults to run on every completed workflow run event

env: GHA_TOKEN: ${{ secrets.GHA_TOKEN }} GHA_RUN_ID: ${{ github.event.workflow_run.id }} GHA_RUN_NAME: ${{ github.event.workflow_run.name }} NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} GHA_DEBUG: ${{ secrets.GHA_DEBUG }}

jobs: new-relic-exporter: name: new-relic-exporter runs-on: ubuntu-latest if: ${{ always() }} steps:

mattdavis0351 commented 4 weeks ago

same repo. I'll take red herring as the cause here. I'll do some more exploring in New Relic. Thanks for the response.

dpacheconr commented 4 weeks ago

feel free to reopen if the issues persists