Skip to content

Introduce tag generator into OTel metrics payload#1340

Merged
blt merged 11 commits intomainfrom
blt/introduce_tag_generator_into_otel_metrics_payload
May 15, 2025
Merged

Introduce tag generator into OTel metrics payload#1340
blt merged 11 commits intomainfrom
blt/introduce_tag_generator_into_otel_metrics_payload

Conversation

@blt
Copy link
Copy Markdown
Collaborator

@blt blt commented Apr 30, 2025

What does this PR do?

This commit introduces the generic tag generator into the otel metrics template code, allowing the attributes per to be obeyed.

Motivation

REF SMPTNG-659

Copy link
Copy Markdown
Collaborator Author

blt commented Apr 30, 2025

@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from c484f6a to bfe5e9d Compare May 8, 2025 18:46
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from 7fb6ccc to 290b8f4 Compare May 8, 2025 18:46
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from 290b8f4 to f0996d7 Compare May 8, 2025 19:02
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch 2 times, most recently from 7e8c002 to 6d6ec9a Compare May 8, 2025 19:14
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from f0996d7 to 65e9d76 Compare May 8, 2025 19:14
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from 6d6ec9a to dedcc09 Compare May 12, 2025 18:02
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from 65e9d76 to f9c8702 Compare May 12, 2025 18:02
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from dedcc09 to 82aa53b Compare May 12, 2025 21:43
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from f9c8702 to 0e5e725 Compare May 12, 2025 21:43
@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 bot commented May 12, 2025

Datadog Summary

✅ Code Quality    ✅ Code Security    ✅ Dependencies


Was this helpful? Give us feedback!

@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from 82aa53b to f57d8f9 Compare May 12, 2025 21:46
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from 0e5e725 to 50269bb Compare May 12, 2025 21:46
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from 316ebaf to c2ded89 Compare May 15, 2025 15:59
// used by that generator: the generator maintains its own rng. It's a
// quirk of the trait.
//
// However DO NOT use this function's `rng` argument in any regard.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

anything we can do to make this more obvious until we have a better solution?
eg maybe rename argument rng to rng_do_not_use_me or something

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This comment echos verbage from the underlying generator. IIRC we've been okay for two years or something at this point. It does seem like a smell still, but I'm also hesitant to make a trait for this very specific case. I dunno, I feel like this comment makes the situation obvious. I'm happy to entertain any name changes though.

.ok_or(Error::StringGenerate)?;
let val = self
.inner
.using_handle(tag.value)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice, this is the API that supports generating directly into owned data it looks like?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep!

@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch 2 times, most recently from b457687 to 5619433 Compare May 15, 2025 17:25
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch 2 times, most recently from c2a5afe to 44ee1a3 Compare May 15, 2025 22:59
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from 5619433 to 44bf784 Compare May 15, 2025 22:59
@blt blt changed the base branch from blt/add_configuration_validation_for_otel_metrics to graphite-base/1340 May 15, 2025 23:14
blt added 10 commits May 15, 2025 23:14
This commit introduces the generic tag generator into the otel metrics template code,
allowing the attributes per to be obeyed.

REF SMPTNG-659

Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from 44ee1a3 to e610b10 Compare May 15, 2025 23:14
@blt blt force-pushed the graphite-base/1340 branch from 44bf784 to e927680 Compare May 15, 2025 23:14
@blt blt changed the base branch from graphite-base/1340 to main May 15, 2025 23:14
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
@blt blt force-pushed the blt/introduce_tag_generator_into_otel_metrics_payload branch from e610b10 to 11841e5 Compare May 15, 2025 23:15
@blt blt merged commit 231f9b9 into main May 15, 2025
21 checks passed
Copy link
Copy Markdown
Collaborator Author

blt commented May 15, 2025

Merge activity

  • May 15, 7:29 PM EDT: @blt merged this pull request with Graphite.

@blt blt deleted the blt/introduce_tag_generator_into_otel_metrics_payload branch May 15, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants