Skip to content

debugger: snapshot correlation tests#7330

Draft
grantseltzer wants to merge 2 commits into
mainfrom
grantseltzer/correlation-tests
Draft

debugger: snapshot correlation tests#7330
grantseltzer wants to merge 2 commits into
mainfrom
grantseltzer/correlation-tests

Conversation

@grantseltzer

Copy link
Copy Markdown
Member

Motivation

The Live Debugger lets an engineer drop logpoints into running code and see snapshots of what happened. Those snapshots are supposed to tell a complete story of a request from start to finish, but today the related snapshots often arrive in pieces, with no signal that anything is missing. There is now an approved plan for how every language's tracer should behave so the story stays whole, but there was no automated way to say whether each language actually follows it.

This adds that check, so we can track, per language, who meets the standard and who does not yet.

Changes

Adds end-to-end tests that hold each language's tracer to the agreed snapshot-correlation standard:

  • Related snapshots from a single request stay together: either the whole chain arrives or none of it does, never a partial chain, and they share one request id.
  • A logpoint inside a loop records once per request instead of flooding.
  • Each snapshot reports which process and which thread it came from.

The tests run for all six languages (Go, Java, .NET, Node, Python, Ruby). Because no tracer has built this behavior yet, every language is currently marked "not yet implemented," so the tests run without failing the build and will turn green automatically once a language implements the standard. The change also adds the test endpoints to each language's sample app, Go included.

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
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/debugger/test_debugger_snapshot_correlation.py                    @DataDog/debugger @DataDog/system-tests-core
tests/debugger/utils/probes/probe_snapshot_log_correlation.json         @DataDog/debugger @DataDog/system-tests-core
tests/debugger/utils/probes/probe_snapshot_log_correlation_loop.json    @DataDog/debugger @DataDog/system-tests-core
manifests/dotnet.yml                                                    @DataDog/apm-dotnet @DataDog/asm-dotnet
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
tests/debugger/utils.py                                                 @DataDog/debugger @DataDog/system-tests-core
utils/_features.py                                                      @DataDog/system-tests-core
utils/build/docker/dotnet/weblog/Controllers/DebuggerController.cs      @DataDog/apm-dotnet @DataDog/asm-dotnet @DataDog/system-tests-core
utils/build/docker/golang/app/chi/debugger.go                           @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/chi/main.go                               @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/echo/debugger.go                          @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/echo/main.go                              @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/gin/debugger.go                           @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/gin/main.go                               @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/net-http-orchestrion/debugger.go          @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/net-http-orchestrion/main.go              @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/net-http/debugger.go                      @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/app/net-http/main.go                          @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/java/spring-boot/src/main/java/com/datadoghq/system_tests/springboot/debugger/DebuggerController.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/nodejs/express/debugger/index.js                     @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express4-typescript/debugger/index.ts         @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/fastify/debugger/index.js                     @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/python/flask/debugger/debugger_controller.py         @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/ruby/rails72/config/routes.rb                        @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails80/config/routes.rb                        @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/shared/rails/app/controllers/debugger_controller.rb  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core

@datadog-datadog-prod-us1

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

Testing the test | Test the test   View in Datadog   GitHub Actions

Testing the test | all-jobs-are-green   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

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

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