Skip to content

refactor code for synthetic global variable resource#3378

Open
bernata wants to merge 1 commit intoDataDog:masterfrom
bernata:refactor-update-state
Open

refactor code for synthetic global variable resource#3378
bernata wants to merge 1 commit intoDataDog:masterfrom
bernata:refactor-update-state

Conversation

@bernata
Copy link

@bernata bernata commented Dec 21, 2025

The existing code used deep if-else nesting to set properties on syntheticsGlobalVariableModel. It wasn't clear from the updateState what properties of state variable were being set. This pr attempt to simplify updateState by making it clear which properties are set and under what conditions.

Introduce helper functions newGlobalVariableValue and newGlobalVariableParseTestOptions to examine the datadog http response and return values with flags [indicating found/not found in the response]. The behavior of updateState is unchanged.

…ies (DataDog#3356)

[datadog_dashboard] Add semantic_mode support to metric queries

Add support for the semantic_mode property in FormulaAndFunctionMetricQueryDefinition.
This determines how metrics from different sources (OTel semantic conventions) are
combined or displayed. Valid values are 'combined' and 'native'.

- Add semantic_mode schema attribute with enum validation
- Update buildDatadogMetricQuery to handle semantic_mode
- Update buildTerraformQuery to read semantic_mode from API response
- Add acceptance tests for both semantic_mode values

Generate docs for semantic_mode property

remove dupe sentence

Co-authored-by: bruce.tu <bruce.tu@datadoghq.com>
@bernata bernata requested review from a team as code owners December 21, 2025 20:04
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