Skip to content

Conversation

@khrm
Copy link
Contributor

@khrm khrm commented Sep 29, 2025

  • Updated pipelinerunmetrics and taskrunmetrics to use OpenTelemetry instruments (histograms, counters, gauges) for creating and recording metrics.
    Introduced new OpenTelemetry configurations in config/config-observability.yaml for exporters and protocols..
    Rewrote the test suites for pipelinerunmetrics and taskrunmetrics to be compatible with the new OpenTelemetry-based implementation.
  • Updated knative to 1.19

Changes

fixes #8969

Submitter Checklist

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

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Migration from opencensus to opentelemetry sdk.
config-observability requires different fields. By default, we have kept Prometheus to ensure backward compatibility. 

/kind feature

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesnt merit a release note. labels Sep 29, 2025
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 29, 2025
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/pipelinerunmetrics/metrics.go 86.7% 68.8% -17.9
pkg/reconciler/pipelinerun/pipelinerun.go 91.6% 91.6% -0.0
pkg/taskrunmetrics/metrics.go 87.3% 72.8% -14.5

@khrm khrm force-pushed the mig-otel branch 2 times, most recently from bab5a44 to a2ea129 Compare September 29, 2025 10:53
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/pipelinerunmetrics/metrics.go 86.7% 68.8% -17.9
pkg/reconciler/pipelinerun/pipelinerun.go 91.6% 91.6% -0.0
pkg/taskrunmetrics/metrics.go 87.3% 72.8% -14.5

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/pipelinerunmetrics/metrics.go 86.7% 68.8% -17.9
pkg/reconciler/pipelinerun/pipelinerun.go 91.6% 91.6% -0.0
pkg/taskrunmetrics/metrics.go 87.3% 72.8% -14.5

@waveywaves
Copy link
Member

/retest

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/pipelinerunmetrics/metrics.go 86.7% 68.8% -17.9
pkg/reconciler/pipelinerun/pipelinerun.go 91.6% 91.6% -0.0
pkg/taskrunmetrics/metrics.go 87.3% 72.8% -14.5

@waveywaves
Copy link
Member

/retest

@vdemeester vdemeester added this to the v1.7.0 milestone Oct 1, 2025
@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 24, 2025
@vdemeester vdemeester modified the milestones: v1.7.0, v1.8.0 Dec 3, 2025
@enarha
Copy link

enarha commented Dec 15, 2025

Re knative bump, we discussed multiple times that we want knative/pkg@04fdd0b included in the next bump, even though it only exists in main for now (not even in 1.20). It'll unlock the better finalizer management which proved to be an issue for Tekton deployments with multiple controllers managing the same PR/TR resources. So do we want to bump knative/pkg even higher?

@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 16, 2025
@khrm
Copy link
Contributor Author

khrm commented Dec 16, 2025

/assign @vdemeester @waveywaves

@khrm
Copy link
Contributor Author

khrm commented Dec 16, 2025

@enarha I have updated to latest knative/pkg for now.

@khrm
Copy link
Contributor Author

khrm commented Dec 16, 2025

Why are ci tests being skipped?

@khrm
Copy link
Contributor Author

khrm commented Dec 16, 2025

/kind feature

@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 17, 2025
@khrm
Copy link
Contributor Author

khrm commented Dec 17, 2025

@vdemeester @waveywaves Let's review and merge this.

@khrm
Copy link
Contributor Author

khrm commented Dec 17, 2025

/assign @twoGiants

@khrm
Copy link
Contributor Author

khrm commented Dec 18, 2025

/hold

I found an issue while testing. Seems some mistake while rebasing.

1 similar comment
@khrm
Copy link
Contributor Author

khrm commented Dec 18, 2025

/hold

I found an issue while testing. Seems some mistake while rebasing.

@tekton-robot tekton-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 18, 2025
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 18, 2025
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from twogiants after the PR has been reviewed.

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

Details 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

@khrm
Copy link
Contributor Author

khrm commented Dec 18, 2025

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 18, 2025
@khrm
Copy link
Contributor Author

khrm commented Dec 18, 2025

I tested this. It's working fine. @waveywaves @vdemeester

@khrm
Copy link
Contributor Author

khrm commented Dec 18, 2025

@tektoncd/chains-maintainers @tektoncd/triggers-maintainers @tektoncd/results-maintainers You can use the commits in this PR as steps to update knative/pkg and migrate to otel.

@khrm
Copy link
Contributor Author

khrm commented Dec 19, 2025

@tektoncd/chains-maintainers @tektoncd/triggers-maintainers @tektoncd/results-maintainers You can use the commits in this PR as steps to update knative/pkg and migrate to otel.

@waveywaves @vdemeester @twoGiants Let's review this so that other components are unblocked.

@anithapriyanatarajan
Copy link
Contributor

cc: @divyansh42 (results) @infernus01 (triggers) @anithapriyanatarajan (chains)

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 19, 2025
khrm added 7 commits December 20, 2025 00:22
This upgrades knative to latest and other dependent dependencies.
Replaces the legacy knative.dev/pkg/metrics dependency with knative.dev/pkg/observability/configmap to align with the OpenTelemetry migration and ensure correct configuration loading.
This isn't supported after knative otel's migration.
The knativetest.Flags.EmitMetrics flag is no longer supported after
the migration to OpenTelemetry. This commit removes the conditional
initialisation to align with the new metrics system.
Run hack/update-codegen.sh to update generated client code, deepcopy functions, and CRD manifests. This aligns the generated code with recent dependency updates, including changes to finalizer management and context usage in informers.
Update the expected checksums in Pipeline and Task unit tests to match the new values generated after the knative update:
- pkg/apis/pipeline/v1
- pkg/apis/pipeline/v1beta1
This commit migrates the metrics for PipelineRuns and TaskRuns from
OpenCensus to OpenTelemetry.

  The following changes are included:
   - Updated the observability config to support OpenTelemetry.
   - Migrated the implementation of PipelineRun and TaskRun metrics to use
    the OpenTelemetry Go SDK.
   - Updated the tests to work with the new OpenTelemetry-based
    implementation.
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. 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

Status: Todo

Development

Successfully merging this pull request may close these issues.

Drop use of knative.dev/pkg/metrics

7 participants