Skip to content

telemetry: address flakiness in app-started test#6311

Draft
mabdinur wants to merge 1 commit intomainfrom
munir/address-flakiness-in-app-started-first
Draft

telemetry: address flakiness in app-started test#6311
mabdinur wants to merge 1 commit intomainfrom
munir/address-flakiness-in-app-started-first

Conversation

@mabdinur
Copy link
Contributor

Motivation

The test_app_started_is_first_message test needed to be refactored to properly handle multiple runtime_ids when processes fork. Forked processes may not submit app-started/app-closed events and may only generate metrics or logs.

Changes

Refactored test_app_started_is_first_message in tests/test_telemetry.py to:

  • Use flatten_message_batches=True to simplify message handling
  • Group telemetry requests by runtime_id and sort each group by seq_id to maintain correct order
  • Verify that at least one runtime_id has app-started as its first message (accounting for forked processes that may not send app-lifecycle events)
  • Updated docstring to explain the motivation and behavior

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

tests/test_telemetry.py                                                 @DataDog/libdatadog-telemetry @DataDog/apm-sdk-capabilities @DataDog/system-tests-core

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 13, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e955276 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@mabdinur mabdinur force-pushed the munir/address-flakiness-in-app-started-first branch from 8c978e2 to e955276 Compare February 13, 2026 18:19
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.

1 participant

Comments