newrelic-experimental / gitlab

Gitlab exporters to send metrics,logs,traces to New Relic
11 stars 8 forks source link

RuntimeWarning: coroutine 'send_to_nr' was never awaited send_to_nr() v1.0.8 #25

Closed anikix closed 1 year ago

anikix commented 1 year ago

Hello,

I'm facing an issue because no data or traces showed up on my New Relic - Service Opentelemetry and a warning message in my pipeline :

RuntimeWarning: coroutine 'send_to_nr' was never awaited 
send_to_nr()

image

For now, i'm just trying to use the New Relic exporter.

I've followed the blog https://newrelic.com/blog/how-to-relic/monitor-gitlab-with-opentelemetry.

Gitlab Runner version : 16.4.2 Using Kubernetes executor with New Relic Exporter 1.0.8:

stages:
- new-relic-exporter
new-relic-exporter:
 rules:
   - when: always
 image:
   name: docker.io/dpacheconr/gitlab-exporter:1.0.8
   entrypoint: [""]
 stage: new-relic-exporter
 script:
   - python3 -u /app/main.py
   - echo "Done"

Gitlab variables used :

Am I missing something ? Thanks

PS : I've tried to test with the 1.0.6 but I got this with no data on New Relic either image

No data to export, assuming this pipeline jobs are new relic exporters

dpacheconr commented 1 year ago

Hi

gitlab-exporter, it has to be setup to run after all your previous stages have run, if you previous stages are all New Relic exporters or there are no previous stages then there is nothing to export. More information can be found here how to configure it https://newrelic.com/blog/how-to-relic/monitor-gitlab-with-opentelemetry

I have updated the image and should not error out now, please try again

anikix commented 1 year ago

Hi,

Indeed it works better now. Thank you !