From 668bbbfa7fa20e426ff58ec52485d7f5015c7c32 Mon Sep 17 00:00:00 2001 From: vianney Date: Thu, 12 Sep 2024 11:54:14 +0200 Subject: [PATCH] Add agent state header to info endpoint --- ddapm_test_agent/agent.py | 3 ++- releasenotes/notes/addAgentStateToInfo-f9a179ce88f2ab9e.yaml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/addAgentStateToInfo-f9a179ce88f2ab9e.yaml diff --git a/ddapm_test_agent/agent.py b/ddapm_test_agent/agent.py index 83c983b..8dd3401 100644 --- a/ddapm_test_agent/agent.py +++ b/ddapm_test_agent/agent.py @@ -679,7 +679,8 @@ async def handle_info(self, request: Request) -> web.Response: "client_drop_p0s": True, # Just a random selection of some peer_tags to aggregate on for testing, not exhaustive "peer_tags": ["db.name", "mongodb.db", "messaging.system"], - } + }, + headers={"Datadog-Agent-State": "03e868b3ecdd62a91423cc4c3917d0d151fb9fa486736911ab7f5a0750c63824"}, ) async def _handle_traces(self, request: Request, version: Literal["v0.4", "v0.5", "v0.7"]) -> web.Response: diff --git a/releasenotes/notes/addAgentStateToInfo-f9a179ce88f2ab9e.yaml b/releasenotes/notes/addAgentStateToInfo-f9a179ce88f2ab9e.yaml new file mode 100644 index 0000000..9b60def --- /dev/null +++ b/releasenotes/notes/addAgentStateToInfo-f9a179ce88f2ab9e.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Agent-State-Header` to `/info` endpoint.