Skip to content

Profiling guide is outdated after OpenCensus → OpenTelemetry migration #2633

@theakshaypant

Description

@theakshaypant

Summary

The profiling documentation at docs/content/docs/operations/profiling.md contains instructions that no longer apply after the OpenCensus → OpenTelemetry migration in commit baaf5e18c.

What is outdated

1. ConfigMap key rename: profiling.enableruntime-profiling

The old doc instructs users to patch the ConfigMap with profiling.enable:

kubectl patch configmap pipelines-as-code-config-observability \
  -n pipelines-as-code \
  --type merge \
  -p '{"data":{"profiling.enable":"true"}}'

After the migration the correct key is runtime-profiling with values enabled/disabled.


2. Controller section references K_METRICS_CONFIG (removed)

The old doc has an entire section explaining how to add "profiling.enable":"true" inside the K_METRICS_CONFIG JSON environment variable on the controller Deployment and restart the pod. That environment variable and approach are gone after the OTel migration.

Additionally, controller profiling is currently broken: the eventing adapter framework creates the pprof server but never calls ListenAndServe, so port 8008 never opens. The doc should note this limitation rather than providing instructions that silently do nothing. This is tracked upstream in knative/eventing#9007 with a fix in knative/eventing#9008.


3. Webhook prerequisite (CONFIG_OBSERVABILITY_NAME) was missing

The webhook Deployment does not set CONFIG_OBSERVABILITY_NAME by default and falls back to looking for config-observability, which does not exist in the PAC namespace. Without setting:

kubectl set env deployment/pipelines-as-code-webhook \
  -n pipelines-as-code \
  CONFIG_OBSERVABILITY_NAME=pipelines-as-code-config-observability

profiling silently fails for the webhook. This prerequisite was not documented.

Related

Acceptance Criteria

  • Replace profiling.enable with runtime-profiling: enabled/disabled throughout the doc
  • Remove the K_METRICS_CONFIG controller section
  • Add a note that controller profiling is currently non-functional (eventing adapter never starts the pprof server); track knative/eventing#9007 — once knative/eventing#9008 is merged or upstream provides a workaround, add steps for enabling controller profiling
  • Document the CONFIG_OBSERVABILITY_NAME prerequisite for the webhook

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions