Skip to content

Add k8s information to heartbeat payload - #23

Open
artursarlo wants to merge 1 commit into
masterfrom
add_k8s_info_to_heartbeat
Open

Add k8s information to heartbeat payload#23
artursarlo wants to merge 1 commit into
masterfrom
add_k8s_info_to_heartbeat

Conversation

@artursarlo

@artursarlo artursarlo commented Aug 28, 2025

Copy link
Copy Markdown

This PR aims to add namespace, pod and container information to the heartbeat payload.

Description

Using some of the classes already used by the profilers to obtain container / k8s information we added new fields to the heartbeat payload.
The final objective is to allow the backend to keep track of namespaces, pods and containers for each host.
Later we'll add extra functionalities to profiling commands, so that the user can profile specific namespaces, pods and containers.

Related Issue

N/A

Motivation and Context

Refer to description above.

How Has This Been Tested?

  1. Build agent locally
  2. Connected to local backend service
  3. Identified that k8s information was being sent

Screenshots

N/A

Checklist:

  • I have read the CONTRIBUTING document.
  • I have updated the relevant documentation.
  • I have added tests for new logic.

@artursarlo
artursarlo marked this pull request as ready for review August 28, 2025 17:53
@prashantbytesyntax

Copy link
Copy Markdown

lets remove the screensht

@prashantbytesyntax prashantbytesyntax left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the screenshot, instead simply paste the json

logger = get_logger_adapter(__name__)


@dataclass

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ! I like this builder pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants