Skip to content

Provide pod labels with metadata #449

Closed

Description

@tharinduwijewardane

Is your feature request related to a problem? Please describe.
We are unable to aggregate telemetry data using a ID we set as a pod label.

Describe the solution you'd like
Provide pod labels (as a string?) along with the existing metadata
Often a pod name is a generated string and the users track pods by setting labels. Therefore this is a useful feature to have.

Describe alternatives you've considered

Additional context

Activity

  1. tharinduwijewardane commented on Jun 3, 2022

    @tharinduwijewardane
    ContributorAuthor

    What is the feasibility of this? Can someone please point to the existing code where pod ids and pod names are extracted.

  2. aimichelle commented on Jun 9, 2022

    @aimichelle
    Member

    Hi @tharinduwijewardane ! The task isn't particularly difficult, but has a few moving parts. Happy to point you to the right places/work closely with you to push this through.

    Here is the general flow of what happens to extract and make use of the pod labels:

    1. Extracting the labels from pod info that we get from the K8s API. This all happens in the metadata service. The metadata service is responsible for taking the pod info and generating a K8sUpdate proto message which is sent to all of the PEMs. This is where the message is populated: https://github.com/pixie-io/pixie/blob/main/src/vizier/services/metadata/controllers/k8smeta/k8s_metadata_handler.go#L924 and here is where the proto message itself is defined: https://github.com/pixie-io/pixie/blob/main/src/shared/k8s/metadatapb/metadata.proto#L383
    2. The PEMs receive the update, parse it, and store the pod data in-memory: https://github.com/pixie-io/pixie/blob/main/src/shared/metadata/metadata_state.cc#L157
    3. A PxL function can be written to leverage the pod data in PxL. An example is here:
      class PodIDToPodStartTimeUDF : public ScalarUDF {

    Feel free to reach out to me directly on Slack for more detailed questions as well.

  3. added
    triage/acceptedIndicates an issue or PR is ready to be actively worked on.
    priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.
    on Jun 15, 2022
  4. added this to the 2022-Q3 milestone on Jun 15, 2022
  5. zasgar commented on Jun 15, 2022

    @zasgar
    Member

    @tharinduwijewardane, This will be a great feature for us to have. Are you interested in contributing this? We can help out as needed.

  6. tharinduwijewardane commented on Jun 16, 2022

    @tharinduwijewardane
    ContributorAuthor

    @zasgar Yes. I had difficulties building pixie locally (asked them in pixienaut channel). Finally I could get it working with ubuntu 22.04. I am going to look into this now.

  7. tharinduwijewardane commented on Jun 22, 2022

    @tharinduwijewardane
    ContributorAuthor

    @aimichelle @zasgar I submitted a PR for this. Could you please review.

  8. added 3 commits that reference this issue on Jul 14, 2022
    09ff178
    359bf4b
    8f969d2
  9. added a commit that references this issue on Jun 2, 2026
    ea36f65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/k8s-metadatakind/featureNew feature or requestpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions