dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

profiler: record Orchestrion, activation information

Open nsrip-dd opened this issue 1 year ago • 2 comments

What does this PR do?

For tracking adoption of SSI for profiling, record whether the profiler was added using Orchestrion and how the profiler was activated, following the internal "Adding SSI information to profiles" RFC.

The tests aren't great for this. I'm working on a more end-to-end test which builds an app with Orchestrion, enables the profiler, and checks the contents of the profile, possibly using our profiling-backend-in-a-box. In the mean time, I ran the new test with Orchestrion to confirm that the "mechanism" is set:

% ~/repos/orchestrion/orchestrion go test -run=TestOrchestrionProfileInfo -v
=== RUN   TestOrchestrionProfileInfo
=== RUN   TestOrchestrionProfileInfo/env=""
    profiler_test.go:768: {SSI:{Mechanism:orchestrion} Activation:manual}
=== RUN   TestOrchestrionProfileInfo/env="1"
    profiler_test.go:768: {SSI:{Mechanism:orchestrion} Activation:manual}
=== RUN   TestOrchestrionProfileInfo/env="true"
    profiler_test.go:768: {SSI:{Mechanism:orchestrion} Activation:manual}
=== RUN   TestOrchestrionProfileInfo/env="auto"
    profiler_test.go:768: {SSI:{Mechanism:orchestrion} Activation:auto}
--- PASS: TestOrchestrionProfileInfo (0.11s)
    --- PASS: TestOrchestrionProfileInfo/env="" (0.04s)
    --- PASS: TestOrchestrionProfileInfo/env="1" (0.02s)
    --- PASS: TestOrchestrionProfileInfo/env="true" (0.02s)
    --- PASS: TestOrchestrionProfileInfo/env="auto" (0.02s)
PASS
ok  	gopkg.in/DataDog/dd-trace-go.v1/profiler	0.448s

Motivation

To track Orchestrion adoption in the same way that we'll track SSI adoption for other languages/runtimes.

nsrip-dd avatar Aug 08 '24 17:08 nsrip-dd

Benchmarks

Benchmark execution time: 2024-08-30 19:22:23

Comparing candidate commit b70735aea1d8ee1375da2ed31c1e77ae73aa729b in PR branch PROF-10258-add-injection-info with baseline commit e7ca17ef602cfdaa5b0c19b219a13306bdbb757a in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 0 unstable metrics.

pr-commenter[bot] avatar Aug 08 '24 18:08 pr-commenter[bot]

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Aug 29 '24 01:08 github-actions[bot]