Skip to content

test: add e2e test for OpenCensus to OpenTelemetry metrics migration - #1369

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#1369
khrm wants to merge 1 commit into
tektoncd:mainfrom
khrm:e2e-otel-metrics-test

Conversation

@khrm

@khrm khrm commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Adds TestOTelMetrics, a consolidated e2e test for the OC→OTel metrics migration in Tekton Results (PR #1249). The test scrapes the tekton-results-watcher pod's /metrics endpoint on port 9090 and asserts:

  • Infrastructure metrics use new OTel naming: kn_workqueue_* (from knative sharedmain) and go_* runtime metrics
  • Application metrics are present when observed: watcher_taskrun_, watcher_pipelinerun_, watcher_runs_not_stored_count_total, watcher_run_storage_latency_seconds
  • Old OpenCensus metric names (tekton_results_*) are absent

Verified locally with the full results e2e stack (PostgreSQL, TLS, API server, watcher) deployed via test/e2e/01-install.sh.

Relates to #1249

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Tested your changes locally (if this is a code change)
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add 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)
  • Release notes contain the string "action required" if the change requires additional action from users switching to the new release

Release Notes

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 29, 2026
@tekton-robot

Copy link
Copy Markdown
Contributor

[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

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 29, 2026
@khrm
khrm force-pushed the e2e-otel-metrics-test branch 4 times, most recently from 2373fa8 to af6b2ab Compare June 30, 2026 15:39
@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 30, 2026
@khrm
khrm force-pushed the e2e-otel-metrics-test branch from af6b2ab to 084624a Compare June 30, 2026 15:40
Adds TestOTelMetrics and TestOTelMetricsWatcherAfterRun e2e tests for
the OC→OTel metrics migration in Tekton Results (PR tektoncd#1249). Scrapes
the tekton-results-watcher pod /metrics endpoint to verify:

- kn_workqueue_* and go_* infrastructure metrics (OTel naming)
- watcher_run_storage_latency_seconds histogram increments by exactly 1
  after a completed TaskRun is stored by the watcher
- Old OpenCensus metric names absent

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@khrm
khrm force-pushed the e2e-otel-metrics-test branch from 084624a to 23faef5 Compare June 30, 2026 15:54
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants