Skip to content

Implement DD_TRACE_LOG_DIRECTORY#2901

Merged
mtoffl01 merged 5 commits into
mainfrom
mtoff/trace-log-directory
Oct 8, 2024
Merged

Implement DD_TRACE_LOG_DIRECTORY#2901
mtoffl01 merged 5 commits into
mainfrom
mtoff/trace-log-directory

Conversation

@mtoffl01

@mtoffl01 mtoffl01 commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

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

pr-commenter Bot commented Oct 1, 2024

Copy link
Copy Markdown

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
@mtoffl01
mtoffl01 deleted the mtoff/trace-log-directory branch October 8, 2024 14:50
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