-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Project path and agent name information #26
Conversation
@@ -64,7 +67,8 @@ public boolean hasReport() { | |||
.addField(BUILD_STATUS_MESSAGE, build.getBuildStatusSummary().message) | |||
.addField(BUILD_RESULT, result) | |||
.addField(BUILD_RESULT_ORDINAL, ordinal) | |||
.addField(BUILD_IS_SUCCESSFUL, ordinal < 2 ? true : false) | |||
.addField(BUILD_IS_SUCCESSFUL, ordinal < 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a simplification of the code
Hi, |
Done :) |
Hi, While testing in production and exploiting those metrics in Grafana, I realised that the agent name should actually be a tag, and not a field. |
I'll soon append a correction. |
@@ -24,6 +26,7 @@ public AbstractPointGenerator(MeasurementRenderer projectNameRenderer) { | |||
Point.Builder builder = Point | |||
.measurement(name) | |||
.addField(PROJECT_NAME, renderedProjectName) | |||
.addField(PROJECT_PATH, build.getParent().getRelativeNameFrom(Jenkins.getInstance())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An even better alternative could be to remove PROJECT_PATH
(tag and field) completely and add a tag like PARENT
which contains the parent folder like folder1/subfolder5
of a job with path folder1/subfolder5/job2
.
With this more normalized schema it would be possible to filter and group by the parent (which could be for example folders for different areas in Jenkins or the main folder/job of a multi-branch job where each branch / pull request / tag is a separate job).
What's your opinion on this @asimell and @dcoraboeuf?
This PR adds:
Best regards,
Damien