Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracing] Implement initial weblog tests for the runtime metrics feature #3878

Merged
merged 7 commits into from
Jan 31, 2025

Conversation

zacharycmontoya
Copy link
Contributor

"dogstatsd_non_local_traffic: true" to the agent image and start testing runtime metrics by observing what metrics the agent is sending to the backend

Motivation

We need to assert some basic functionalities of the Runtime Metrics feature across various tracing libraries.

Changes

  • Adds the config dogstatsd_non_local_traffic: true to the Datadog agent container
  • Adds a method in the Agent interface to get the metrics it submits to the /api/v2/series backend API
  • Implements new tests in classes Test_Config_RuntimeMetrics_Enabled and Test_Config_RuntimeMetrics_Enabled_WithRuntimeId. Each test case hits an endpoint, waits 10s (that is the default interval for submitting runtime metrics), and asserts properties of the submitted metrics

The end result is that the .NET Tracer and the Java Tracer are fully passing the initial tests

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

…testing runtime metrics by observing what metrics the agent is sending to the backend
- Add Java weblog test skips
- spring-boot-openliberty: Remove DD_JMXFETCH_ENABLED=false
- spring-boot-wildfly: Set DD_APP_CUSTOMLOGMANAGER=true so that we can simultaneously enable JMXFetch and also let Wildfly set up its own java.util.logging backend. This allows the app server to succeed and the container to run, though it fails the tests.
@zacharycmontoya zacharycmontoya marked this pull request as ready for review January 29, 2025 18:05
@zacharycmontoya zacharycmontoya requested review from a team as code owners January 29, 2025 18:05
Copy link
Contributor

@link04 link04 left a comment

Choose a reason for hiding this comment

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

LGTM just one quick nit and comment.

utils/interfaces/_agent.py Outdated Show resolved Hide resolved
tests/test_config_consistency.py Show resolved Hide resolved
@zacharycmontoya zacharycmontoya force-pushed the zach.montoya/weblog/runtime-metrics-tests branch from a788150 to d69f9df Compare January 29, 2025 20:12
@zacharycmontoya zacharycmontoya force-pushed the zach.montoya/weblog/runtime-metrics-tests branch from e379217 to 8b68daf Compare January 29, 2025 20:27
tests/test_config_consistency.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

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

+1 from the Java side

…ument the reason for the DD_DOGSTATSD_START_DELAY=0 configuration.
@zacharycmontoya zacharycmontoya merged commit dec828c into main Jan 31, 2025
436 checks passed
@zacharycmontoya zacharycmontoya deleted the zach.montoya/weblog/runtime-metrics-tests branch January 31, 2025 17:17
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.

4 participants