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

internal/telemetry: don't send app-dependencies-loaded in the absence of Go deps #2740

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

Julio-Guerra
Copy link
Contributor

What does this PR do?

Avoid sending the telemetry request app-dependencies-loaded when there is no Go build info available in the running Go program.

Motivation

Datadog's Software Composition Analysis (SCA) relies on program deps, sent over app-dependencies-loaded, which must not be sent when they are missing.
This issue appeared with Bazel which doesn't seem to include Go build info (bazel-contrib/rules_go#3090).

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!

@Julio-Guerra Julio-Guerra requested a review from a team as a code owner June 12, 2024 11:08
@pr-commenter
Copy link

pr-commenter bot commented Jun 12, 2024

Benchmarks

Benchmark execution time: 2024-06-12 12:08:16

Comparing candidate commit 07b19ed in PR branch julio.guerra/failsafe-buildinfo-read with baseline commit 09bdc86 in branch main.

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

scenario:BenchmarkHttpServeTrace-24

  • 🟥 execution_time [+741.250ns; +808.550ns] or [+4.468%; +4.874%]

@@ -151,7 +151,6 @@ func TestRegisterAppConfig(t *testing.T) {
require.Equal(t, RequestTypeAppStarted, req.RequestType)
appStarted := req.Payload.(*AppStarted)
cfg := appStarted.Configuration
require.Len(t, cfg, 2)
Copy link
Member

Choose a reason for hiding this comment

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

@Julio-Guerra Is this change required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, because I changed the global config with dependencies_available and DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED reported by default all the times, so I removed the enforcement to 2 and let the following assertions fail anyway if the expected config values are missing.

@Julio-Guerra Julio-Guerra requested a review from darccio June 12, 2024 14:17
@Julio-Guerra Julio-Guerra merged commit 79237af into main Jun 12, 2024
158 checks passed
@Julio-Guerra Julio-Guerra deleted the julio.guerra/failsafe-buildinfo-read branch June 12, 2024 19:23
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