chains icon indicating copy to clipboard operation
chains copied to clipboard

Migrate from OpenCensus to OpenTelemetry for metrics instrumentation

Open anithapriyanatarajan opened this issue 6 months ago • 3 comments

Feature request

Replace the usage of the go.opencensus.io library with go.opentelemetry.io, for metrics instrumentation in the project.

Use case

OpenCensus is deprecated and no longer maintained. The OpenTelemetry project is its successor and provides a unified framework for metrics, traces, and logs instrumentation. Migrating to OpenTelemetry ensures the project aligns with modern observability practices with active community support.

anithapriyanatarajan avatar May 17 '25 15:05 anithapriyanatarajan

This isn't a chains issue. It's more of a knative pkg issue. There's already an issue there for this. We use knative/pkg for metrics abstraction and some in built metrics.

khrm avatar Jun 26 '25 07:06 khrm

This isn't a chains issue. It's more of a knative pkg issue. There's already an issue there for this. We use knative/pkg for metrics abstraction and some in built metrics.

@khrm opencensus is directly used for Metric definition, View Registration and Tag Management(Ex:https://github.com/tektoncd/chains/blob/main/pkg/pipelinerunmetrics/metrics.go#L46) . Knative pkg is used for recording metrics. So there is a need for us to assess the impact in the context of chains and do the needful to migrate to OpenTelemetry.

anithapriyanatarajan avatar Jun 26 '25 09:06 anithapriyanatarajan

@anithapriyanatarajan We can't migrate without recorder being migrated to otel. Recorder comes from knative/pkg.

khrm avatar Jun 27 '25 07:06 khrm