Skip to content

Comments

DogStatsD v1.2 Container ID support with sampling support#649

Open
marc-harrison wants to merge 3 commits intoprometheus:masterfrom
marc-harrison:marc/container_id_support_extended
Open

DogStatsD v1.2 Container ID support with sampling support#649
marc-harrison wants to merge 3 commits intoprometheus:masterfrom
marc-harrison:marc/container_id_support_extended

Conversation

@marc-harrison
Copy link

@marc-harrison marc-harrison commented Sep 23, 2025

Fixes #640.

Signed-off-by: Marc Harrison <marc@impart.security>
Copilot AI review requested due to automatic review settings September 23, 2025 16:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for DogStatsD v1.2 container ID extension, allowing metrics to include container ID information via a |c:<container_id> suffix. The implementation extends the existing parser to handle up to 5 components (increased from 4) and adds parsing logic for the container ID section.

  • Increased component limit from 4 to 5 to accommodate the new container ID field
  • Added parsing logic for the |c:<container_id> format with proper validation
  • Enhanced test coverage for various container ID scenarios including sampling, different metric types, and malformed inputs

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/line/line.go Implements container ID parsing logic and increases component limit
pkg/line/line_test.go Adds comprehensive test cases for container ID functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Marc Harrison <marc@impart.security>
@marc-harrison marc-harrison force-pushed the marc/container_id_support_extended branch from b1f9092 to f68b77b Compare September 23, 2025 16:27
Copy link
Contributor

@pedro-stanaka pedro-stanaka left a comment

Choose a reason for hiding this comment

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

it looks mostly good, the log line will show the wrong message, if I am not mistaken, no?

Signed-off-by: Marc Harrison <marc@impart.security>
@marc-harrison marc-harrison force-pushed the marc/container_id_support_extended branch from c8bee20 to 3493551 Compare September 24, 2025 05:39
Copy link
Contributor

@pedro-stanaka pedro-stanaka left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the contribution.

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.

DogStatsD v1.2 Container ID support

2 participants