Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 28 additions & 20 deletions pkg/chains/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,32 @@ limitations under the License.
package chains

const (
SignedMessagesCount = "sgcount"
SignsStoredCount = "stcount"
PayloadUploadeCount = "plcount"
MarkedAsSignedCount = "mrcount"
PipelineRunSignedName = "pipelinerun_sign_created_total"
PipelineRunSignedDesc = "Total number of signed messages for pipelineruns"
PipelineRunUploadedName = "pipelinerun_payload_uploaded_total"
PipelineRunUploadedDesc = "Total number of uploaded payloads for pipelineruns"
PipelineRunStoredName = "pipelinerun_payload_stored_total"
PipelineRunStoredDesc = "Total number of stored payloads for pipelineruns"
PipelineRunMarkedName = "pipelinerun_marked_signed_total"
PipelineRunMarkedDesc = "Total number of objects marked as signed for pipelineruns"
TaskRunSignedName = "taskrun_sign_created_total"
TaskRunSignedDesc = "Total number of signed messages for taskruns"
TaskRunUploadedName = "taskrun_payload_uploaded_total"
TaskRunUploadedDesc = "Total number of uploaded payloads for taskruns"
TaskRunStoredName = "taskrun_payload_stored_total"
TaskRunStoredDesc = "Total number of stored payloads for taskruns"
TaskRunMarkedName = "taskrun_marked_signed_total"
TaskRunMarkedDesc = "Total number of objects marked as signed for taskruns"
SignedMessagesCount = "sgcount"
SignsStoredCount = "stcount"
PayloadUploadeCount = "plcount"
MarkedAsSignedCount = "mrcount"
PipelineRunSignedName = "pipelinerun_sign_created_total"
PipelineRunSignedDesc = "Total number of signed messages for pipelineruns"
PipelineRunUploadedName = "pipelinerun_payload_uploaded_total"
PipelineRunUploadedDesc = "Total number of uploaded payloads for pipelineruns"
PipelineRunStoredName = "pipelinerun_payload_stored_total"
PipelineRunStoredDesc = "Total number of stored payloads for pipelineruns"
PipelineRunMarkedName = "pipelinerun_marked_signed_total"
PipelineRunMarkedDesc = "Total number of objects marked as signed for pipelineruns"
PipelineRunSignedMsg = "pipelinerun_signed_messages"
Copy link
Contributor

@lcarva lcarva Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How's this different than PipelineRunSignedName ?

Actually, I'm not sure how any of the ones being added are different than the existing ones. What am I missing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ones currently used produce totals across the entire cluster. We need a more detailed information, such as a namespace, taskname, success/failure and other kinds of labels attached to the counters. So my proposal is to leave the old ones alone and create a new time series that can be utilized to display info related to individual projects in Grafana or some other tool.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Can we make the name and description indicative of this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a naming convention?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an official one. I would just like to make it obvious that certain metric is namespace based. Does that make sense?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it look ok?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lcarva do the names look ok to you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay! Yes, that looks reasonable. Were you thinking about doing the same for TaskRuns as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, just wanted to make small and manageable changes at a time.

PipelineRunSignedMsgDesc = "Number of signed messages for pipelineruns"
PipelineRunUplPayload = "pipelinerun_payload_uploaded"
PipelineRunUplPayloadDesc = "Number of uploaded payloads for pipelineruns"
PipelineRunPayloadStored = "pipelinerun_payload_stored"
PipelineRunPayloadStoredDesc = "Number of stored payloads for pipelineruns"
PipelineRunMarkedSigned = "pipelinerun_marked_signed"
PipelineRunMarkedDSignedesc = "Number of objects marked as signed for pipelineruns"
TaskRunSignedName = "taskrun_sign_created_total"
TaskRunSignedDesc = "Total number of signed messages for taskruns"
TaskRunUploadedName = "taskrun_payload_uploaded_total"
TaskRunUploadedDesc = "Total number of uploaded payloads for taskruns"
TaskRunStoredName = "taskrun_payload_stored_total"
TaskRunStoredDesc = "Total number of stored payloads for taskruns"
TaskRunMarkedName = "taskrun_marked_signed_total"
TaskRunMarkedDesc = "Total number of objects marked as signed for taskruns"
)