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

Implement DD_TRACE_LOG_DIRECTORY #2901

Merged
merged 5 commits into from
Oct 8, 2024
Merged

Implement DD_TRACE_LOG_DIRECTORY #2901

merged 5 commits into from
Oct 8, 2024

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented Oct 1, 2024

What does this PR do?

Supports specifying a log directory for tracer logs via DD_TRACE_LOG_DIRECTORY env var. If directory exists on the underlying os, tracer creates log file ddtrace.log at specified path and all tracer logs are routed to said file. Tracer maintains default behavior (log to stdout) if directory is invalid or does not exist.

Motivation

Bring dd-trace-go up to speed on feature parity (other tracing libs support this). RFC

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!

@pr-commenter
Copy link

pr-commenter bot commented Oct 1, 2024

Benchmarks

Benchmark execution time: 2024-10-07 21:21:53

Comparing candidate commit a9d646d in PR branch mtoff/trace-log-directory with baseline commit 2a34b15 in branch main.

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

scenario:BenchmarkInjectW3C-24

  • 🟥 execution_time [+91.751ns; +136.649ns] or [+2.249%; +3.350%]

@mtoffl01 mtoffl01 marked this pull request as ready for review October 2, 2024 15:33
@mtoffl01 mtoffl01 requested review from a team as code owners October 2, 2024 15:33
@mtoffl01 mtoffl01 merged commit 7704733 into main Oct 8, 2024
145 checks passed
@mtoffl01 mtoffl01 deleted the mtoff/trace-log-directory branch October 8, 2024 14:50
MNThomson pushed a commit to agilebits/dd-trace-go that referenced this pull request Oct 21, 2024
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.

2 participants