-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
branch
tag missing on metrics and events
#334
Comments
I've noticed the same thing. For us, it looks like pipelines using multibranch pipelines don't pick up the branch name, where the few that do have a branch tag set are just using the Git plugin to check out a repository. If I've followed the flow correctly, datadog-plugin/src/main/java/org/datadog/jenkins/plugins/datadog/util/git/GitUtils.java Lines 367 to 377 in e4b2e23
DD_GIT_BRANCH and GIT_BRANCH , but not the one the multibranch pipeline plugin sets, BRANCH_NAME
|
If the |
Did you ever figure out this issue? |
I actually cannot remember how I fixed it, but I do see the iirc one of the plugin versions had a fix for this issue and it just started working without any other intervention. |
I am curious if anyone found out what the out-of-the-box fix is. I do seem to have a |
Hi @sebastiaanspeck, A new version of the plugin (7.2.0) was released today, which adds a workaround that should help to detect proper branch names for such builds. |
Describe the bug
branch
is not set as a a tag on any metric, and it is not set on any events.Screenshots
My plugin config is pretty much the defaults:
nothing else is changed.
I also have an env var set in Jenkins:
Environment and Versions (please complete the following information):
Jenkins 2.375.3, on EKS 1.22
plugin: 5.3.0
Additional context
On metrics, e.g.
jenkins.job.completed
I get all other documented tags:jenkins_url
,job
,node
,result
,user_id
.On events, e.g. "Build completed", I get all other documented tags as well:
event_type
,jenkins_url
,job
,node
,result
,user_id
.It looks like
branch
is consistently missing across the board. Can you provide any insight into how I can troubleshoot that? I'm aware I can set tags via https://github.com/jenkinsci/datadog-plugin#pipeline-customization, but didn't want to do it for a "built-in" tag.The text was updated successfully, but these errors were encountered: