openshift-pipelines/pipelines-as-code

Metrics Exporter Bundles Remote Tasks Together and Labels Them as "Anonymous"

Closed this issue · 1 comments

Description:

When running a pipeline with a mix of ClusterTask and remote Task definitions, the Tekton controller correctly exports metrics for the ClusterTask. However, metrics for the remote tasks are bundled together and labeled as "anonymous" in Prometheus.

Steps to Reproduce:

  1. Define a pipeline with both ClusterTask and remote Task references.
  2. Execute the pipeline.
  3. Observe the metrics exported by the Tekton controller.

Expected Behavior:
Each task, whether ClusterTask or remote Task, should have its own distinct metrics exported, labeled with the appropriate task name (e.g., git-clone or stakater-create-git-tag).

Actual Behavior:
Metrics for remote tasks are bundled together and labeled as "anonymous," making it difficult to distinguish between them.

Example Pipeline Snippet:

Copy code
- name: fetch-repository
  taskRef:
    name: git-clone
    kind: ClusterTask
  params:
    - name: depth
      value: "0"
  
- name: create-git-tag
  taskRef:
    name: stakater-create-git-tag
    kind: Task
  
- name: create-environment
  taskRef:
    kind: Task
    name: stakater-create-environment
  params:

@OsamaKhan220 it would be better if you report this on tektoncd/pipeline.