I've setup the exporter, in webhook mode, with the config below.
Once the first webhook is received, the initial scrape of all projects, environments and refs of the wildcard is triggered and the environments are pulled, so far so good. Once this inital run is over, a new environment is created and a pipeline, using the new environment, triggers the webhook, it cannot get the metrics cause of a 404 exception, see below.
{"ip-address":"192.168.201.69:40774","level":"debug","msg":"webhook request","time":"2023-12-28T12:53:39Z","user-agent":"GitLab/16.5.2-ee"}
{"level":"info","msg":"received a pipeline webhook from GitLab for a ref, triggering metrics pull","project-name":"p1/gcpe-test","ref":"main","ref-kind":"branch","time":"2023-12-28T12:53:39Z"}
{"jobs-count":1,"level":"debug","msg":"found pipeline jobs","pipeline-id":19760,"project-name-or-id":"p1/gcpe-test","time":"2023-12-28T12:53:41Z"}
{"ip-address":"192.168.60.200:46118","level":"debug","msg":"webhook request","time":"2023-12-28T12:53:43Z","user-agent":"GitLab/16.5.2-ee"}
{"environment-name":"gcpe-stage2","error":"GET https://gitlab.example.com/api/v4/projects/p1/gcpe-test/environments/0: 404 {message: 404 Not found}","level":"error","msg":"updating event from GitLab API","project-name":"p1/gcpe-test","time":"2023-12-28T12:53:44Z"}
{"ip-address":"192.168.60.200:46118","level":"debug","msg":"webhook request","time":"2023-12-28T12:53:44Z","user-agent":"GitLab/16.5.2-ee"}
{"level":"info","msg":"received a pipeline webhook from GitLab for a ref, triggering metrics pull","project-name":"p1/gcpe-test","ref":"main","ref-kind":"branch","time":"2023-12-28T12:53:44Z"}
{"jobs-count":1,"level":"debug","msg":"found pipeline jobs","pipeline-id":19760,"project-name-or-id":"p1/gcpe-test","time":"2023-12-28T12:53:46Z"}
{"ip-address":"192.168.60.200:45020","level":"debug","msg":"webhook request","time":"2023-12-28T12:53:50Z","user-agent":"GitLab/16.5.2-ee"}
**{"environment-name":"gcpe-stage2","error":"GET https://gitlab.example.com/api/v4/projects/p1/gcpe-test/environments/0: 404 {message: 404 Not found}","level":"error","msg":"updating event from GitLab API","project-name":"p1/gcpe-test","time":"2023-12-28T12:53:50Z"}**
{"ip-address":"192.168.60.200:45020","level":"debug","msg":"webhook request","time":"2023-12-28T12:53:51Z","user-agent":"GitLab/16.5.2-ee"}
{"level":"info","msg":"received a pipeline webhook from GitLab for a ref, triggering metrics pull","project-name":"p1/gcpe-test","ref":"main","ref-kind":"branch","time":"2023-12-28T12:53:51Z"}
{"jobs-count":1,"level":"debug","msg":"found pipeline jobs","pipeline-id":19760,"project-name-or-id":"p1/gcpe-test","time":"2023-12-28T12:53:53Z"}
Hi together,
I've setup the exporter, in webhook mode, with the config below. Once the first webhook is received, the initial scrape of all projects, environments and refs of the wildcard is triggered and the environments are pulled, so far so good. Once this inital run is over, a new environment is created and a pipeline, using the new environment, triggers the webhook, it cannot get the metrics cause of a 404 exception, see below.
Newly created branches seem to work, they appear in the dashboard.