Skip to content

Make embedded git.properties have lower priority than other git metadata sources - #5160

Merged
nikita-tkachenko-datadog merged 1 commit into
masterfrom
nikita-tkachenko/git-info-providers-priority-fix
May 9, 2023
Merged

Make embedded git.properties have lower priority than other git metadata sources#5160
nikita-tkachenko-datadog merged 1 commit into
masterfrom
nikita-tkachenko/git-info-providers-priority-fix

Conversation

@nikita-tkachenko-datadog

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

Copy link
Copy Markdown
Contributor

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-datadognikita-tkachenko-datadog added type: bug fix Bug fix comp: ci visibility Continuous Integration Visibility labels May 5, 2023
@pr-commenter

pr-commenterBot commented May 5, 2023

Copy link
Copy Markdown

Benchmarks

Parameters

BaselineCandidate
commit1.14.0-SNAPSHOT~41ae2f7dec1.14.0-SNAPSHOT~2bbf77c1fe
configbaselinecandidate
See matching parameters
BaselineCandidate
moduleAgentAgent
parentNoneNone

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-Agentsame
scenario:Startup-base-Agent.startsame
scenario:Startup-base-BytebuddyAgentsame
scenario:Startup-base-GlobalTracersame
scenario:Startup-base-AppSecsame
scenario:Startup-base-Remote Configsame
scenario:Startup-base-Telemetrysame
scenario:Startup-iast-Agentsame
scenario:Startup-iast-Agent.startsame
scenario:Startup-iast-BytebuddyAgentsame
scenario:Startup-iast-GlobalTracersame
scenario:Startup-iast-AppSecsame
scenario:Startup-iast-IASTsame
scenario:Startup-iast-Remote Configsame
scenario:Startup-iast-Telemetrysame
scenario:Startup-waf-Agentsame
scenario:Startup-waf-Agent.startsame
scenario:Startup-waf-BytebuddyAgentsame
scenario:Startup-waf-GlobalTracersame
scenario:Startup-waf-AppSecsame
scenario:Startup-waf-Remote Configsame
scenario:Startup-waf-Telemetrysame

@nikita-tkachenko-datadog
nikita-tkachenko-datadogforce-pushed the nikita-tkachenko/git-info-providers-priority-fix branch from 823864d to 2bbf77cCompareMay 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 deleted the nikita-tkachenko/git-info-providers-priority-fix branch May 9, 2023 13:02
@github-actionsgithub-actionsBot added this to the 1.14.0 milestone May 9, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: ci visibilityContinuous Integration Visibilitytype: bug fixBug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@nikita-tkachenko-datadog@smola