Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddtrace/tracer: fix trace_agent_url on startup log #2949

Merged
merged 10 commits into from
Nov 8, 2024

Conversation

rachelyangdog
Copy link
Contributor

@rachelyangdog rachelyangdog commented Oct 24, 2024

What does this PR do?

Updates the start up log so that it logs the correct value for "agent_url"

Motivation

When DD_TRACE_AGENT_URL is set to a valid unix socket (e.g, unix:///var/run/datadog/apm.socket), the startup log on dd-trace-go contains: "agent_url":"http://uds__var_run_datadog_apm.socket/v0.4/traces". We wanted the startup log to reflect the actual, un-normalized socket value instead.

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.
  • 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!

@rachelyangdog rachelyangdog requested a review from a team as a code owner October 24, 2024 21:29
@rachelyangdog rachelyangdog marked this pull request as draft October 24, 2024 21:29
@rachelyangdog rachelyangdog changed the title ddtrace/tracer: fix trace_agent_url on Golang startup log ddtrace/tracer: fix trace_agent_url on startup log Oct 24, 2024
@pr-commenter
Copy link

pr-commenter bot commented Oct 24, 2024

Benchmarks

Benchmark execution time: 2024-11-07 20:11:30

Comparing candidate commit 728d921 in PR branch rachel.yang/fix-trace-agent-url with baseline commit bebced4 in branch main.

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

@rachelyangdog rachelyangdog marked this pull request as ready for review November 1, 2024 18:06
@mtoffl01 mtoffl01 self-assigned this Nov 4, 2024
Copy link
Contributor

@mtoffl01 mtoffl01 left a comment

Choose a reason for hiding this comment

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

Good work! Your comments make things extra-clear which I appreciate 😉 .
Let's just add a few more test cases to ensure the changes are robust.

Btw, would change the Motivation section of the PR description to this, instead:

When DD_TRACE_AGENT_URL is set to a valid unix socket (e.g, unix:///var/run/datadog/apm.socket), the startup log on dd-trace-go contains: "agent_url":"http://uds__var_run_datadog_apm.socket/v0.4/traces". We wanted the startup log to reflect the actual, un-normalized socket value instead.

ddtrace/tracer/log_test.go Show resolved Hide resolved
ddtrace/tracer/log_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/log_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mtoffl01 mtoffl01 left a comment

Choose a reason for hiding this comment

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

one more small nit 😄

ddtrace/tracer/log_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mtoffl01 mtoffl01 left a comment

Choose a reason for hiding this comment

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

one more small nit 😄

Copy link
Contributor

@mtoffl01 mtoffl01 left a comment

Choose a reason for hiding this comment

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

Approving, just waiting to be sure CI is green.

@darccio darccio merged commit 586a0bb into main Nov 8, 2024
149 of 150 checks passed
@darccio darccio deleted the rachel.yang/fix-trace-agent-url branch November 8, 2024 16:30
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