Skip to content

Conversation

khrm
Copy link
Contributor

@khrm khrm commented Aug 31, 2021

Number of metrics produced can be reduced by controlling the depth or the level using configmap. Available levels are namespace, run pipelinerun/taskrun or pipeline/task. Also, type of metrics can be changed from histogram to prometheus gauge/opencensus last value. Doing this will reduce the load on metrics databases. Implementation of tektoncd/community#466

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

Metrics tags/labels type on taskrun/pipelinerun and task/pipeline can be eliminated metrics using configmap. Also, the type of metrics for duration - histogram or gauge/last value, can also be configured.

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 31, 2021
@tekton-robot tekton-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 31, 2021
@khrm khrm force-pushed the metrics branch 2 times, most recently from 4ba5913 to 20f9666 Compare September 1, 2021 12:16
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 1, 2021
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 5, 2021
@khrm khrm changed the title WIP: Add Configuration for Metrics Simplification Add Configuration for Metrics Cardinality Simplification Sep 5, 2021
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 5, 2021
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 41.2%
pkg/apis/config/store.go 57.1% 59.4% 2.2

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 41.2%
pkg/apis/config/store.go 57.1% 59.4% 2.2

@khrm
Copy link
Contributor Author

khrm commented Sep 5, 2021

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 5, 2021
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 41.2%
pkg/apis/config/store.go 57.1% 59.4% 2.2
pkg/taskrunmetrics/metrics.go 81.8% 70.7% -11.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/taskrunmetrics/metrics.go 81.8% 70.7% -11.1

@khrm khrm force-pushed the metrics branch 2 times, most recently from 7e6e2a7 to 7147697 Compare September 5, 2021 21:13
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/pipelinerunmetrics/metrics.go 75.8% 60.8% -15.0
pkg/reconciler/pipelinerun/pipelinerun.go 82.6% 14.2% -68.5
pkg/taskrunmetrics/metrics.go 81.8% 70.7% -11.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/pipelinerunmetrics/metrics.go 75.8% 60.8% -15.0
pkg/taskrunmetrics/metrics.go 81.8% 70.7% -11.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/pipelinerunmetrics/metrics.go 75.8% 60.8% -15.0
pkg/taskrunmetrics/metrics.go 81.8% 70.7% -11.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/pipelinerunmetrics/metrics.go 75.8% 77.3% 1.5
pkg/taskrunmetrics/metrics.go 81.8% 81.0% -0.8

@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 6, 2021
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/pipelinerunmetrics/metrics.go 75.8% 79.5% 3.7
pkg/taskrunmetrics/metrics.go 81.8% 81.0% -0.8

Number of metrics produced can be reduced by controlling the depth
or the level using configmap. Available levels are namespace, run
pipelinerun/taskrun or pipeline/task. Also, type of metrics can
be changed from histogram to prometheus gauge/opencensus last value.
Doing this will reduce the load on metrics databases.
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/pipelinerunmetrics/metrics.go 75.8% 79.5% 3.7
pkg/taskrunmetrics/metrics.go 81.8% 82.4% 0.5

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/metrics.go Do not exist 70.6%
pkg/apis/config/store.go 57.1% 56.2% -0.9
pkg/pipelinerunmetrics/metrics.go 75.8% 79.8% 4.0
pkg/taskrunmetrics/metrics.go 81.8% 82.5% 0.6

@khrm
Copy link
Contributor Author

khrm commented Sep 6, 2021

/test tekton-pipeline-unit-tests

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2021
@dlorenc
Copy link
Contributor

dlorenc commented Sep 6, 2021

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 6, 2021
@vdemeester
Copy link
Member

/retest

@tekton-robot tekton-robot merged commit bda40ea into tektoncd:main Sep 7, 2021
khrm added a commit to khrm/community that referenced this pull request Feb 23, 2022
khrm added a commit to khrm/community that referenced this pull request Feb 28, 2022
khrm added a commit to khrm/community that referenced this pull request Feb 28, 2022
khrm added a commit to khrm/community that referenced this pull request Feb 28, 2022
khrm added a commit to khrm/community that referenced this pull request Feb 28, 2022
khrm added a commit to khrm/community that referenced this pull request Mar 14, 2022
tekton-robot pushed a commit to tektoncd/community that referenced this pull request Mar 14, 2022
@khrm khrm deleted the metrics branch February 28, 2023 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants