Skip to content

Add dedicated Datadog log file support#19

Open
joshfriend wants to merge 1 commit intomainfrom
dd-log-forwarding
Open

Add dedicated Datadog log file support#19
joshfriend wants to merge 1 commit intomainfrom
dd-log-forwarding

Conversation

@joshfriend
Copy link
Copy Markdown
Collaborator

@joshfriend joshfriend commented Apr 20, 2026

Add a DDLog logger that writes JSON to a file tailed by the Datadog
Agent, configured via DD_LOG_PATH

@joshfriend joshfriend changed the title Forward slog output to Datadog Agent via file tailing Forward metrics to Datadog Agent via file tailing Apr 20, 2026
@joshfriend joshfriend force-pushed the dd-log-forwarding branch 3 times, most recently from a53eee1 to 5bbc346 Compare April 20, 2026 16:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba91423563

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/gradle-cache/main.go
slog.Warn("failed to open Datadog log file, DD logging disabled", "path", cli.DDLogFile, "error", err)
}
defer ddCleanup()
kctx.BindTo(ddLog, (**gradlecache.DDLog)(nil))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Route runtime logs through the Datadog file logger

This change only creates and binds ddLog, but no execution path actually writes to it: DDLog is added to config structs (gradlecache/restore.go and gradlecache/save.go) and then never used by Restore, RestoreDelta, Save, or SaveDelta. As a result, setting DD_LOG_PATH opens a file but produces no telemetry events, so Datadog file tailing gets nothing despite the new CLI flag promising log forwarding.

Useful? React with 👍 / 👎.

Add a DDLog logger that writes JSON to a file tailed by the Datadog
Agent, configured via DD_LOG_PATH.
@joshfriend joshfriend changed the title Forward metrics to Datadog Agent via file tailing Add dedicated Datadog log file support Apr 20, 2026
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.

1 participant