newrelic-experimental / gitlab

Gitlab exporters to send metrics,logs,traces to New Relic
9 stars 6 forks source link

GitLab integration with newrelic #9

Closed bsddv532 closed 1 year ago

bsddv532 commented 1 year ago

I had configured all the environment variables and also configured the exporters which are mentioned in the blog but still I didn't get any data on my new relic Ui, can anyone help me with this

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

image

dpacheconr commented 1 year ago

Can you send screenshot of the logs from the newrelic-exporters jobs? If it failed to send the data to NR, you should be able to see it in the logs

bsddv532 commented 1 year ago

This is the screenshot of the logs which I got from newrelic-exporters job image

dpacheconr commented 1 year ago

From the output seems job succeeded, but I can't see what version of the exporter was used and seems logs were also disabled, so you should only expect to see span data. Only certain parts of the dashboard will work, as some of them are based on log events from the metrics exporter. Go to query your data in NR and run SELECT * FROM Span WHERE gitlab.source = 'gitlab-exporter' since 15 days ago and let us know if you can see any data

bsddv532 commented 1 year ago

No, I didn't find any data in that query, and how can I enable the logs in that image

dpacheconr commented 1 year ago

Have you double checked the account you querying is the same account you set the license key in gitlab? Feel free to reach out directly via dpacheco@newrelic.com

bsddv532 commented 1 year ago

Yes this is the same account that I have used

dpacheconr commented 1 year ago

Can you show me the variables you configured, your yaml configurations for gitlab.ci, newrelic-exporter, the version exporter you used

bsddv532 commented 1 year ago

Yeah sure I sent everything in your mail, Please check it once

silanpa commented 1 year ago

I had the same problem, and it was because of the runner setting. If you use the gitlab.com runner, the entrypoint that has the image configured is executed. When you set a local runner depending on the runner configuration is whether the entrypoint of each image is executed. I think that's could be your problem.

bsddv532 commented 1 year ago

@silanpa are you using a local runner or gitlab.com runner ?

silanpa commented 1 year ago

gitlab.com

bsddv532 commented 1 year ago

@silanpa I am using local runner, so can you tell me what configurations have to be made to execute the entry point of images.

silanpa commented 1 year ago

@bsddv532 I not use any configuration because use the default entrypoint and cloud runner. The default configuration is in Dockerfiles

If you need more information of how work entrypoint in gitlab check this documentation Gitlab Entrypoint

dpacheconr commented 1 year ago

Hi

If the issue is that default entrypoint is being overwritten because you are running on local runner, then you can now define an entrypoint in the .gitlab-ci.yml file. https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#For%20Docker%2017.06%20and%20later

image: name: docker.io/dpacheconr/gitlab-exporter:1.0.2 entrypoint: [ "python3", "-u" , "exporter.py"]

Regards

Diogo Pacheco Senior Solutions Architect EMEA Field Engineering Team www.newrelic.com http://www.newrelic.com

On Mon, 6 Mar 2023 at 13:05, Ivan Tapia @.***> wrote:

@bsddv532 https://github.com/bsddv532 I not use any configuration because use the default entrypoint and cloud runner. The default configuration is in Dockerfiles

If you need more information of how work entrypoint in gitlab check this documentation Gitlab Entrypoint https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#where-scripts-are-executed

— Reply to this email directly, view it on GitHub https://github.com/newrelic-experimental/gitlab/issues/9#issuecomment-1456097278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYBQSML4XK6XWD44WNNXNKTW2XOJFANCNFSM6AAAAAAVOPMYOQ . You are receiving this because you commented.Message ID: @.***>

bsddv532 commented 1 year ago

No still I didn't get any data in NewRelic

silanpa commented 1 year ago

You local runner is a Kubernetes? @bsddv532

bsddv532 commented 1 year ago

@silanpa my local runner is docker

dpacheconr commented 1 year ago

Have you tried using docker executor runner instead of shell executor runner as per my other email

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Deepak Kumar Pradhan @.> Sent: Tuesday, March 7, 2023 6:05:26 AM To: newrelic-experimental/gitlab @.> Cc: dpacheconr @.>; Comment @.> Subject: Re: [newrelic-experimental/gitlab] GitLab integration with newrelic (Issue #9)

No, my local runner is docker desktop

— Reply to this email directly, view it on GitHubhttps://github.com/newrelic-experimental/gitlab/issues/9#issuecomment-1457595622, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYBQSMJQXXXQCVY627RMCODW23F2NANCNFSM6AAAAAAVOPMYOQ. You are receiving this because you commented.Message ID: @.***>

bsddv532 commented 1 year ago

@dpacheconr Yeah, now I got the data in NewRelic, Thank you for the help.

But I think it will be better if this thing is mentioned in the document also that we need to use the docker executor for this integration.