Skip to content

Add configuration validation for OTel metrics#1339

Merged
blt merged 1 commit intomainfrom
blt/add_configuration_validation_for_otel_metrics
May 15, 2025
Merged

Add configuration validation for OTel metrics#1339
blt merged 1 commit intomainfrom
blt/add_configuration_validation_for_otel_metrics

Conversation

@blt
Copy link
Copy Markdown
Collaborator

@blt blt commented Apr 30, 2025

What does this PR do?

This commit adds validation cases to the OTel metrics payload
generator. To date we have not done that much to guide users in
getting a good configuration of lading but in this payload we have
sufficient information to be of some help.

Motivation

REF SMPTNG-659

Copy link
Copy Markdown
Collaborator Author

blt commented Apr 30, 2025

@blt blt added the no-changelog label Apr 30, 2025 — with Graphite App
@blt blt marked this pull request as ready for review April 30, 2025 21:55
@blt blt requested a review from a team as a code owner April 30, 2025 21:55
@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/bound_contexts_in_opentelemetry_metrics branch from 972f1c9 to afd9721 Compare May 8, 2025 18:46
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch from afd9721 to ff7beef 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/bound_contexts_in_opentelemetry_metrics branch 2 times, most recently from 1d5cdf2 to 6f427f7 Compare May 12, 2025 18:02
@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/add_configuration_validation_for_otel_metrics branch from dedcc09 to 82aa53b Compare May 12, 2025 21:43
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch from 6f427f7 to 02e8aa4 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/add_configuration_validation_for_otel_metrics branch from fc0cdd2 to 4820c51 Compare May 14, 2025 16:15
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch from 9e252a6 to 4bd9ed3 Compare May 14, 2025 16:54
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from 4820c51 to 9664139 Compare May 14, 2025 16:55
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch from 4bd9ed3 to da54724 Compare May 14, 2025 17:02
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from 9664139 to 8044ee7 Compare May 14, 2025 17:02
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch from da54724 to 556b3f3 Compare May 14, 2025 21:04
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from 8044ee7 to 17c504f Compare May 14, 2025 21:04
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch from 556b3f3 to 0966a3e Compare May 14, 2025 22:00
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch 2 times, most recently from c103524 to d23dbc3 Compare May 14, 2025 22:05
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch from 922e878 to c0e8cb9 Compare May 15, 2025 15:46
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from d23dbc3 to 1fd813e Compare May 15, 2025 15:46
@blt blt force-pushed the blt/bound_contexts_in_opentelemetry_metrics branch 2 times, most recently from ff661c3 to de3a40b Compare May 15, 2025 15:58
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from 1fd813e to c550638 Compare May 15, 2025 15:58
// Validate that the requested contexts are achievable
if min_contexts > max_configured {
return Err(format!(
"Minimum requested contexts {min_contexts} cannot be achieved with current configuration (max possible: {max_configured})"
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 addition, this validation is very helpful (and annoying and tricky to write), thanks for adding this in.

@blt blt changed the base branch from blt/bound_contexts_in_opentelemetry_metrics to graphite-base/1339 May 15, 2025 17:24
@blt blt force-pushed the graphite-base/1339 branch from de3a40b to fd420d0 Compare May 15, 2025 17:24
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from c550638 to b457687 Compare May 15, 2025 17:24
@graphite-app graphite-app bot changed the base branch from graphite-base/1339 to main May 15, 2025 17:25
@blt blt force-pushed the blt/add_configuration_validation_for_otel_metrics branch from b457687 to 5619433 Compare May 15, 2025 17:25
This commit adds validation cases to the OTel metrics payload
generator. To date we have not done that much to guide users in
getting a good configuration of lading but in this payload we have
sufficient information to be of some help.

REF SMPTNG-659

Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
@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 merged commit e927680 into main May 15, 2025
21 checks passed
Copy link
Copy Markdown
Collaborator Author

blt commented May 15, 2025

Merge activity

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

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