Skip to content

internal/civisibility/integrations/gotesting: add the DD_CIVISIBILITY_ENABLED kill switch environment variable#2861

Merged
eliottness merged 3 commits into
mainfrom
tony/civisibility-add-kill-switch
Sep 13, 2024
Merged

internal/civisibility/integrations/gotesting: add the DD_CIVISIBILITY_ENABLED kill switch environment variable#2861
eliottness merged 3 commits into
mainfrom
tony/civisibility-add-kill-switch

Conversation

@tonyredondo

Copy link
Copy Markdown
Member

What does this PR do?

This PR adds a mechanism to use the existing DD_CIVISIBILITY_ENABLED environment variable as a kill switch to avoid enabling CI Visibility on an instrumented process.

Motivation

This is useful for orchestrion instrumentation to allow us control when we want ci visibility to be enabled or not.

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!

… switch before executing testing.M.Run() to allow changing the value inside a `TestMain()`
@tonyredondo tonyredondo self-assigned this Sep 13, 2024
@tonyredondo
tonyredondo requested a review from a team as a code owner September 13, 2024 11:51
Comment thread internal/civisibility/integrations/gotesting/instrumentation.go Outdated
@pr-commenter

pr-commenter Bot commented Sep 13, 2024

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2024-09-13 12:27:38

Comparing candidate commit c755b12 in PR branch tony/civisibility-add-kill-switch with baseline commit e081e4a in branch main.

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

@eliottness
eliottness merged commit 07c4b72 into main Sep 13, 2024
@eliottness
eliottness deleted the tony/civisibility-add-kill-switch branch September 13, 2024 13:57
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.

3 participants