Skip to content

Adds total_bytes_received metric emitted by all blackholes#1702

Open
cmetz100 wants to merge 1 commit intomainfrom
cmetz/io_exp_poc
Open

Adds total_bytes_received metric emitted by all blackholes#1702
cmetz100 wants to merge 1 commit intomainfrom
cmetz/io_exp_poc

Conversation

@cmetz100
Copy link
Contributor

What does this PR do?

Adds another bytes_received metric called total_bytes_received emitted by every blackhole that is guaranteed to be a single series.

Motivation

In current state if we were to configure lading to have multiple different types of blackholes we would emit multiple bytes_received series since the labels passed through to blackhole metrics have component:blackhole and component_name:{type of blackhole}.

In addition, if you supply an ID when defining a blackhole, if there are multiple (even if they are the same type) we will similarly have multiple bytes_received series

For clarity I find it appealing to have one total_bytes_received metric for all blackholes while maintaining the current behavior for bytes_received

Additional Notes

See this notebook for more context

@cmetz100 cmetz100 force-pushed the cmetz/io_exp_poc branch 3 times, most recently from 479bb5d to 1eec465 Compare February 11, 2026 18:37
Signed-off-by: Caleb Metz <caleb.metz@datadoghq.com>

changelog

Signed-off-by: Claude <noreply@anthropic.com>
@cmetz100 cmetz100 marked this pull request as ready for review February 11, 2026 19:52
@cmetz100 cmetz100 requested a review from a team as a code owner February 11, 2026 19:52
///
/// Note: the meaning of "bytes" varies by transport — HTTP-based blackholes report wire bytes,
/// while gRPC-based blackholes (OTLP gRPC, Datadog Stateful Logs) report protobuf `encoded_len()`.
pub(super) static COMMON_BLACKHOLE_LABELS: &[(&str, &str)] = &[("component", "blackhole")];
Copy link
Contributor

Choose a reason for hiding this comment

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

are there other instances of us emitting the total_bytes_received metric with different components?

If a tag can only have a single possible value, it's not too too useful on it's own.

Could you elaborate on why we need this tag/facet?

Copy link
Contributor Author

@cmetz100 cmetz100 Feb 13, 2026

Choose a reason for hiding this comment

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

There are not any other instances of total_bytes_received with different components, intentionally.

My thought process here was to have this label be applied to all the different blackholes so that in the future if we do define some new component that will emit total_bytes_received we have the separation.

We could choose to remove this for now, im not opposed, or rework the labels applied to the pre existing bytes_received to extend from common labels

Copy link
Contributor

Choose a reason for hiding this comment

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

My thought process here was to have this label be applied to all the different blackholes so that in the future if we do define some new component that will emit total_bytes_received we have the separation.

I'm always hesitant to merge changes "in case of something". I'd prefer to tackle that need then when the use case comes up.

imo we should drop it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Im convinced. Will simplify things as well.

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