Migrate metrics from OpenCensus to OpenTelemetry#3332
Migrate metrics from OpenCensus to OpenTelemetry#3332infernus01 wants to merge 4 commits intotektoncd:mainfrom
Conversation
0dc71d3 to
f61fbf6
Compare
| k8s.io/client-go => k8s.io/client-go v0.32.4 | ||
| k8s.io/code-generator => k8s.io/code-generator v0.32.4 | ||
| k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250627150254-e9823e99808e | ||
| knative.dev/eventing => knative.dev/eventing v0.30.3 |
There was a problem hiding this comment.
I don't see we are consuming eventing pkg anywhere in the code.
86e5edc to
d7b90d1
Compare
d7b90d1 to
381cf86
Compare
khrm
left a comment
There was a problem hiding this comment.
I think we should remove metrics in the operator. These aren't used by customers or users. It was for some telemetry, but it's not working properly for that also.
If I get time, I would write more on that.
We have stories to enhance overall metrics on operator, to move to olm level 3 and for 4, i didnt dig into details for these levels, but lets not remove metrics for now, until we tackle properly those stories please |
381cf86 to
0073e6f
Compare
0073e6f to
a401552
Compare
a401552 to
956f7a9
Compare
956f7a9 to
7024c10
Compare
7024c10 to
395abb6
Compare
|
@khrm would like to move forward with this, do you lgtm , or do you still think we need antoher approch removing metrics in operator ? |
|
@anithapriyanatarajan given you work on opentelemetry assessment, would like your review in this one please, would like to move froward on it |
I was talking of removing the custom metrics which we added to the operator. Even if we don't remove them, why should we surface those in release notes? It will confuse users. |
395abb6 to
3ea3592
Compare
|
@khrm For now I have updated the release notes sectino to not include those custom metrics. |
|
@khrm understood now, @infernus01 would you be able to update the PR then, i think it make sense to remove those to start with clean metrics list |
2096493 to
9e10e51
Compare
anithapriyanatarajan
left a comment
There was a problem hiding this comment.
@infernus01 Please consider metioning the metrics that were removed as part of release notes. Also remove the metrics.go file if no metrics are recorded.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Update knative.dev/pkg to OTel-based observability stack, bump k8s.io/* to v0.35.2, openshift/* to k8s-1.35-compatible versions, knative.dev/eventing, tektoncd/pipeline to v1.11.0, and go.opentelemetry.io/otel to v1.42.0. This removes knative.dev/pkg/metrics (OpenCensus) from the vendor tree and brings in knative.dev/pkg/observability (OpenTelemetry). Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
Run ./hack/update-codegen.sh to regenerate client code, informers, and injection reconcilers after the knative.dev/pkg dependency bump. Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
Replace OpenCensus imports (go.opencensus.io/stats, stats/view, tag) with OpenTelemetry (go.opentelemetry.io/otel, otel/attribute, otel/metric). Also updates config-observability.yaml to use OTel configuration keys (metrics-protocol, tracing-protocol) and removes legacy OpenCensus keys. Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
Wouldn't that conflict with @khrm's comment, that it was not even documented before why we should even write that in release notes.? |
The custom metrics (pipeline_reconcile_count, trigger_reconcile_count, chains_reconciled, results_reconciled) were never documented, never consumed by any dashboard or alert. Infrastructure metrics from Knative (workqueue, HTTP client, Go runtime) continue to be emitted. Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
9e10e51 to
937156e
Compare
Changes
Migrates Operator metrics from the deprecated OpenCensus library to OpenTelemetry.
go.opencensus.io/stats,stats/view,tag) with OpenTelemetry (go.opentelemetry.io/otel,otel/attribute,otel/metric) intektonpipeline/metrics.go,tektontrigger/metrics.go,tektonchain/metrics.go, andtektonresult/metrics.gometric.Int64Counterand gauge metric tometric.Float64Gaugetektonresult/metrics_test.goto usesdkmetric.ManualReaderfor asserting actual collected metric valuesconfig-observability.yamlto use OTel configuration keys (metrics-protocol,tracing-protocol) and remove legacy OpenCensus keysknative.dev/pkgtov0.0.0-20260318013857-98d5a706d4fd(OTel observability stack)./hack/update-codegen.sh/kind feature
closes : #3307
fixes : #3331
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes