Skip to content

Conversation

@felixge
Copy link
Member

@felixge felixge commented Oct 30, 2025

What does this PR do?

Calling tracer.Start() implicitly stops any existing tracer before starting a new one. This was not working correctly for runtime metrics v2, causing a second Start() call to stop the existing runtime metrics v2 emitter, but not starting a new one and printing an error to the log instead.

This PR adds a test case to reproduce the issue as well as a fix.

Motivation

ZD 2321693 has an example of somebody running into this issue.

It's possible that the problem in that ticket is caused by an unintended second call to Start(), but that's a separate issue.

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 ./scripts/lint.sh 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 October 30, 2025 12:29
@felixge
Copy link
Member Author

felixge commented Oct 30, 2025

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Oct 30, 2025

View all feedbacks in Devflow UI.

2025-10-30 14:52:41 UTC ℹ️ Start processing command /merge


2025-10-30 14:52:56 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-10-30 18:53:07 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants