Skip to content

test: add e2e test for OpenCensus to OpenTelemetry metrics migration#10355

Open
khrm wants to merge 1 commit into
tektoncd:mainfrom
khrm:e2e-otel-metrics-test
Open

test: add e2e test for OpenCensus to OpenTelemetry metrics migration#10355
khrm wants to merge 1 commit into
tektoncd:mainfrom
khrm:e2e-otel-metrics-test

Conversation

@khrm

@khrm khrm commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Verifies PR #9043's OTel migration by creating TaskRuns (success, fail, cancel, timed) and PipelineRuns (single-task, multi-task, cancel), then scraping the controller /metrics endpoint to assert counter values, histogram observation counts and bucket placement, gauge presence, metric renames (kn_workqueue_, go_), and removed metrics.

Changes

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

NONE

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Jun 26, 2026
@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 26, 2026
@tekton-robot

Copy link
Copy Markdown
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 khrm 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 khrm left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

/kind misc

@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Jun 26, 2026
@khrm khrm requested a review from Copilot June 26, 2026 12:15
@khrm khrm force-pushed the e2e-otel-metrics-test branch from 72e2291 to f0a1fed Compare June 26, 2026 12:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Go e2e integration test in ./test to validate the OpenCensus → OpenTelemetry metrics migration from PR #9043 by creating a representative set of TaskRuns/PipelineRuns and scraping the controller’s /metrics endpoint to assert expected metric presence/absence and basic value characteristics.

Changes:

  • Introduces a consolidated e2e test that provisions successful/failed/cancelled/timed TaskRuns and several PipelineRun variants.
  • Scrapes controller Prometheus metrics via the apiserver pod proxy and parses metric families for assertions.
  • Adds checks for renamed infrastructure metrics (e.g., kn_workqueue_*, go_*) and confirms removal of legacy reconcile metrics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/metrics_otel_test.go
Comment thread test/metrics_otel_test.go
@khrm khrm force-pushed the e2e-otel-metrics-test branch 2 times, most recently from e83d83a to eaf005e Compare June 26, 2026 12:37
@khrm khrm requested a review from Copilot June 26, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread test/metrics_otel_test.go
Comment thread test/metrics_otel_test.go Outdated
Comment thread test/metrics_otel_test.go
@khrm khrm force-pushed the e2e-otel-metrics-test branch from eaf005e to 4ef25aa Compare June 26, 2026 13:08
@khrm khrm requested a review from Copilot June 26, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread test/metrics_otel_test.go Outdated
@khrm khrm force-pushed the e2e-otel-metrics-test branch from 4ef25aa to a7ff17d Compare June 26, 2026 13:44
@khrm khrm requested a review from Copilot June 26, 2026 13:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread test/metrics_otel_test.go Outdated
@khrm khrm force-pushed the e2e-otel-metrics-test branch from a7ff17d to 36a9fb7 Compare June 26, 2026 18:35
@khrm khrm requested a review from Copilot June 26, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@khrm khrm force-pushed the e2e-otel-metrics-test branch 2 times, most recently from ce5e2e4 to 0edfb95 Compare June 29, 2026 06:34

@khrm khrm left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Somehow build is failing in CI. But locally everything works.

SYSTEM_NAMESPACE=tekton-pipelines go test -v -tags=e2e -count=1 -timeout=15m -run ^TestOTelMetrics$ ./test/

@khrm

khrm commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Somehow tests are failing with latest ko not the older version of ko.

@khrm khrm force-pushed the e2e-otel-metrics-test branch 3 times, most recently from ad5f2fd to 48e2d3e Compare June 29, 2026 18:14
Verifies PR tektoncd#9043's OTel migration by creating TaskRuns (success, fail,
cancel, timed) and PipelineRuns (single-task, multi-task, cancel), then
scraping the controller /metrics endpoint to assert counter values,
histogram observation counts and bucket placement, gauge presence,
metric renames (kn_workqueue_*, go_*), and removed metrics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@khrm khrm force-pushed the e2e-otel-metrics-test branch from 48e2d3e to f5b3a2f Compare June 30, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/misc Categorizes issue or PR as a miscellaneuous one. release-note-none Denotes a PR that doesnt merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants