Skip to content

Conversation

@nikita-tkachenko-datadog
Copy link
Contributor

@nikita-tkachenko-datadog nikita-tkachenko-datadog commented May 5, 2023

What Does This Do

There is a component in the tracer that fetches git metadata associated with the traced code.
The component has a few sources that it uses to obtain the data:

  • environment variables set explicitly by the user
  • git.properties file available on the classpath (injected either manually or by a Maven/Gradle plugin)
  • environment variables set by CI provider (e.g. Jenkins or CircleCI)
  • .git folder that is available locally

The sources are listed in order of priority.
The last two sources are only available if CI Visibility subsystem is enabled in the tracer.

This PR changes the relative priorities of git metadata sources, making git.properties the least preferable one.

Motivation

git.properties is the least reliable of the sources, as we have no way of ensuring that the file located on the classpath resides in the JAR that we want to trace, and not in some 3rd party dependency.
We want to try other more reliable sources before resorting to this one.

Additional Notes

Embedded git metadata extraction was added in scope of PR 4951

@nikita-tkachenko-datadog nikita-tkachenko-datadog added type: bug Bug report and fix comp: ci visibility Continuous Integration Visibility labels May 5, 2023
@pr-commenter
Copy link

pr-commenter bot commented May 5, 2023

Benchmarks

Parameters

Baseline Candidate
commit 1.14.0-SNAPSHOT~41ae2f7dec 1.14.0-SNAPSHOT~2bbf77c1fe
config baseline candidate
See matching parameters
Baseline Candidate
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases.

See unchanged results
scenario Δ mean execution_time
scenario:Startup-base-Agent same
scenario:Startup-base-Agent.start same
scenario:Startup-base-BytebuddyAgent same
scenario:Startup-base-GlobalTracer same
scenario:Startup-base-AppSec same
scenario:Startup-base-Remote Config same
scenario:Startup-base-Telemetry same
scenario:Startup-iast-Agent same
scenario:Startup-iast-Agent.start same
scenario:Startup-iast-BytebuddyAgent same
scenario:Startup-iast-GlobalTracer same
scenario:Startup-iast-AppSec same
scenario:Startup-iast-IAST same
scenario:Startup-iast-Remote Config same
scenario:Startup-iast-Telemetry same
scenario:Startup-waf-Agent same
scenario:Startup-waf-Agent.start same
scenario:Startup-waf-BytebuddyAgent same
scenario:Startup-waf-GlobalTracer same
scenario:Startup-waf-AppSec same
scenario:Startup-waf-Remote Config same
scenario:Startup-waf-Telemetry same

@nikita-tkachenko-datadog nikita-tkachenko-datadog force-pushed the nikita-tkachenko/git-info-providers-priority-fix branch from 823864d to 2bbf77c Compare May 5, 2023 16:17
@nikita-tkachenko-datadog nikita-tkachenko-datadog marked this pull request as ready for review May 8, 2023 08:28
@nikita-tkachenko-datadog nikita-tkachenko-datadog requested review from a team as code owners May 8, 2023 08:28
@nikita-tkachenko-datadog nikita-tkachenko-datadog merged commit 4615312 into master May 9, 2023
@nikita-tkachenko-datadog nikita-tkachenko-datadog deleted the nikita-tkachenko/git-info-providers-priority-fix branch May 9, 2023 13:02
@github-actions github-actions bot added this to the 1.14.0 milestone May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: ci visibility Continuous Integration Visibility type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants