Skip to content

feat(profiler): show config in profile "Runtime Info" tab#3588

Merged
felixge merged 4 commits into
mainfrom
push-ksqlrsqrvxzl
Jun 3, 2025
Merged

feat(profiler): show config in profile "Runtime Info" tab#3588
felixge merged 4 commits into
mainfrom
push-ksqlrsqrvxzl

Conversation

@felixge

@felixge felixge commented Jun 3, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Show the profiler config in the "Runtime Info" tab of the profiler viewer: Example

2025-06-03 Continuous Profiler - Explorer  Datadog at 12 48 34@2x

Can be tested with:

$ cd internal/apps
$ dd-auth docker-compose run --build scenario memory-leak/heap$

Motivation

This will help with debugging, especially internal usage.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running golangci-lint run locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@felixge
felixge requested review from a team as code owners June 3, 2025 10:50
@pr-commenter

pr-commenter Bot commented Jun 3, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-06-03 14:34:05

Comparing candidate commit c762b18 in PR branch push-ksqlrsqrvxzl with baseline commit 1eedb8b in branch main.

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

Comment thread profiler/options.go
"flush_on_exit": c.flushOnExit,
}
for _, tc := range telemetryConfiguration(c) {
info[tc.Name] = tc.Value

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.

👍

@nsrip-dd nsrip-dd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice refactor! I tested this out with a toy program and confirmed that I see the info in the profiling UI, and the startup logs still look reasonable.

felixge added 4 commits June 3, 2025 16:23
Keep everything the same, except for "enabled_profiles" which is
replaced with "cpu_profile_enabled", "heap_profile_enabled", etc.
because the telemetry client is using the latter values and there
shouldn't be a strong reason for using a different approach in the
startup log.
@felixge
felixge force-pushed the push-ksqlrsqrvxzl branch from 60b1e60 to c762b18 Compare June 3, 2025 14:23
@felixge
felixge enabled auto-merge (squash) June 3, 2025 14:38
@felixge
felixge merged commit cd2484f into main Jun 3, 2025
@felixge
felixge deleted the push-ksqlrsqrvxzl branch June 3, 2025 14:43
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.

3 participants