Skip to content

Fix telemetry submission - #305

Merged
ofek merged 1 commit into
mainfrom
ofek/fix-telemetry
Sep 11, 2026
Merged

Fix telemetry submission#305
ofek merged 1 commit into
mainfrom
ofek/fix-telemetry

Conversation

@ofek

@ofek ofek commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Telemetry submission does not work for new users of developer environments and existing users who happen to clear their cache volume.

The daemon's communication directory disappears because https://github.com/DataDog/datadog-agent-buildimages/blob/c4de8da8719b26238f6d238c88c6924b60faf1b2/dev-envs/linux/finalize.sh#L21 clears the cache. Startup then runs dda self telemetry enable, but consent only removes an existing dissent file and does not recreate the directory. Only dissent currently ensures the parent exists.

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Sep 11, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 90.00%
Overall Coverage: 70.58% (+0.39%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 915e155 | Docs | View more details | Give us feedback!

@ofek
ofek marked this pull request as ready for review September 11, 2026 07:58
@ofek
ofek requested a review from a team as a code owner September 11, 2026 07:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T22:28:25.498076Z 915e155 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: ec85fd54e8

ℹ️ 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 src/dda/telemetry/manager.py Outdated
from dda.telemetry.constants import DaemonEnvVars
from dda.utils.process import EnvVars

self.__storage_dir.ensure_dir()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle cache creation failures without aborting commands

When the configured cache parent is unavailable or read-only—for example, when DDA_CACHE_DIR points to a missing mount—ensure_dir() raises synchronously from the root CLI callback. Because app.telemetry.watch() runs before normal subcommands, this makes optional telemetry initialization abort commands that do not otherwise need the cache; previously the directory-related failure occurred only in the detached telemetry daemon. Please keep directory creation best-effort so telemetry storage failures cannot prevent the requested command from running.

Useful? React with 👍 / 👎.

ofek added a commit to DataDog/datadog-agent-buildimages that referenced this pull request Sep 11, 2026
@ofek
ofek force-pushed the ofek/fix-telemetry branch from ec85fd5 to 915e155 Compare September 11, 2026 22:25
@ofek
ofek merged commit 9ddd887 into main Sep 11, 2026
27 checks passed
@ofek
ofek deleted the ofek/fix-telemetry branch September 11, 2026 22:37
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