Add discoveryServiceMapEnabled field to AgentConfiguration proto#471
Conversation
0233288 to
c9b279f
Compare
brycekahle
left a comment
There was a problem hiding this comment.
It seems fine, but I'm curious if you need a flag at all? Is there going to be additional data in the payload? Would the existence of that data indicate the feature is enabled?
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76133a4c54
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // Populated by discovery service map mode in lieu of DDSketches and | ||
| // firstLatencySample, since discovery mode does not retain a sketch | ||
| // or per-request samples. | ||
| AvgLatency float64 `protobuf:"fixed64,5,opt,name=avgLatency,proto3" json:"avgLatency,omitempty"` |
There was a problem hiding this comment.
Regenerate descriptor metadata for new avgLatency field
Adding AvgLatency here without updating the embedded fileDescriptor_69b34851fbf62631 leaves HTTPStats_Data.Descriptor() out of sync with the struct and marshal/unmarshal logic. Any reflection-based consumer (e.g., descriptor-driven tooling, dynamic protobuf handling, or schema introspection) will not see avgLatency and can silently ignore/drop it even though generated encode/decode methods now use field 5; this commit should include a full proto regeneration so descriptor metadata matches the new field.
Useful? React with 👍 / 👎.
@brycekahle This flag means we won’t bill for USM and will process the data through the new discovery service map pipeline |
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
bar.fins@datadoghq.com unqueued this merge request |
|
/merge -c |
|
View all feedbacks in Devflow UI.
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Discovery service map mode does not retain DDSketches or per-request samples; it tracks only counts and a running latency sum. Add a dedicated avgLatency field (nanoseconds) so downstream consumers can distinguish discovery-mode averages from the legacy firstLatencySample single-sample optimization. Field 5 on HTTPStats.Data, double, fixed64. Generated code edited by hand (proto codegen toolchain isn't available on Windows). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Discovery service map mode previously shipped a precomputed mean (LatencySum/Count) on the wire. That prevents the backend from correctly aggregating across hosts (an average of averages requires weighting by sample count, and we lose that information once the mean is computed client-side per flush window). Switch the proto field to carry the raw running latency sum. The backend (NSX) computes the mean as latencySum/count when emitting dd.apm.usm_service_map.latency_ns, matching the resolved design in the USM Discovery Mode RFC, Appendix B. Field number unchanged (5) so wire encoding is identical; only the field name and the agent's interpretation of it change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8f6dc28 to
595b669
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 595b669d7d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // and firstLatencySample. The mean is computed at the backend as | ||
| // latencySum / count; shipping the raw sum (instead of a precomputed | ||
| // mean) preserves correct cross-host aggregation. | ||
| LatencySum float64 `protobuf:"fixed64,5,opt,name=latencySum,proto3" json:"latencySum,omitempty"` |
There was a problem hiding this comment.
Regenerate the descriptor with the latencySum name
Fresh evidence after the rename: decompressing fileDescriptor_69b34851fbf62631 in this file still shows field 5 as avgLatency and contains no latencySum, while the generated struct/marshal/unmarshal code now uses LatencySum with protobuf name latencySum. Reflection-based consumers using HTTPStats_Data.Descriptor() will therefore see the wrong schema name for field 5 and can ignore or mis-handle the new metric; please regenerate the protobuf output so the embedded descriptor matches the proto and generated methods.
Useful? React with 👍 / 👎.
1f6234f to
595b669
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f6234f814
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| rm -rf $GOPATH/src/github.com/DataDog/agent-payload | ||
| ln -sf {root_dir} $GOPATH/src/github.com/DataDog/agent-payload |
There was a problem hiding this comment.
Avoid deleting the checked-out repository during codegen
In the codegen workflow I checked, the job runs from /home/runner/work/agent-payload/agent-payload/go/src/github.com/DataDog/agent-payload with GOPATH=/home/runner/work/agent-payload/agent-payload/go (.github/workflows/test.yml), so $GOPATH/src/github.com/DataDog/agent-payload is the current checkout and also {root_dir}. This new rm -rf therefore deletes the repository before recreating a symlink to the same now-deleted path, causing the subsequent mkdir, protoc, and final git diff steps to operate on a missing/self-referential checkout; it also breaks the documented local setup where the repo is already checked out inside GOPATH.
Useful? React with 👍 / 👎.
…dep-map-poc # Conflicts: # process/agent.pb.go # process/connections.pb.go
624fb85 to
e634912
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
DDCI pipeline didn't start (sourcing_failed)... Please retry. DDCI Change Request: |
What does this PR do?
Adds a new discoveryServiceMapEnabled (field 7) boolean to the AgentConfiguration proto message in process/connections.proto. This allows the agent to signal whether the Discovery service map feature is enabled in its
configuration.
Motivation
Enables the agent to communicate whether the Discovery dependency map (service map) feature is turned on, so downstream consumers (e.g. the backend/process-agent) can act on that configuration flag. This is the proto
groundwork for the Discovery service map POC.
Additional Notes
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
Reviewer's Checklist
Reviewers: please see the review guidelines.