Skip to content

parametric: add dynamic config tests#1172

Merged
Kyle-Verhoog merged 36 commits intomainfrom
kylev/dc
Aug 29, 2023
Merged

parametric: add dynamic config tests#1172
Kyle-Verhoog merged 36 commits intomainfrom
kylev/dc

Conversation

@Kyle-Verhoog
Copy link
Copy Markdown
Member

@Kyle-Verhoog Kyle-Verhoog commented May 11, 2023

Description

Add shared tests for the first version of Dynamic Configuration of trace libraries (via Remote Config). Dynamic Configuration is the ability for the APM libraries to reconfigure themselves at runtime in response to configuration received via Remote Configuration.

V1 of Dynamic Config (targeted for public beta) includes three options which can be configured:

  1. Sample rate
  2. Logs injection
  3. HTTP header tagging

Tests for these options are added here.

In order to support testing the header tagging, new RPCs are added to the interface to enable requests to be made with an HTTP client and to an HTTP web server.

Depends on:

Additional notes

Comment thread parametric/test_dynamic_configuration.py Outdated
Copy link
Copy Markdown
Collaborator

@robertomonteromiguel robertomonteromiguel left a comment

Choose a reason for hiding this comment

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

We are migrating step by step the parametric tests as a system-tests scenario.
Please let me know when you are ready to merge this PR, in order to merge to the new parametric folder.

Take a look: https://github.com/DataDog/system-tests/tree/main/tests/parametric

Comment thread tests/parametric/test_dynamic_configuration.py Outdated
@Kyle-Verhoog Kyle-Verhoog requested a review from a team July 27, 2023 18:24
@Kyle-Verhoog Kyle-Verhoog requested review from a team as code owners July 27, 2023 18:24
Comment thread tests/parametric/conftest.py
Comment thread tests/parametric/conftest.py
Copy link
Copy Markdown
Collaborator

@pawelchcki pawelchcki 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 to me.
I would be interested to see if the RC tests are not more flaky - overall, and the runtime is not extended too much.

But as is it looks ok to me. (other than one small nit question)

Copy link
Copy Markdown
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

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

The CI is failing : https://github.com/DataDog/system-tests/actions/runs/5755478486/job/15603094324?pr=1172

But I don't know if it's related. If it's not, AGTM

@Kyle-Verhoog Kyle-Verhoog merged commit b2655f0 into main Aug 29, 2023
@Kyle-Verhoog Kyle-Verhoog deleted the kylev/dc branch August 29, 2023 18:11
1) Validate the sample rate is effective (approx sample_rate% of traces should be received)
2) The `_dd.rule_psr` metric is set to the correct value.
"""
# This tag should be set on the first span in a chunk (first span in the list of spans sent to the agent).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tag _dd.rule_psr is added to the root span, which is not guaranteed to be the first span in a payload (the span order is not defined).

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.

9 participants