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

(fix) internal/civisibility/utils: improve environment tags mutability (v2) #3077

Open
wants to merge 1 commit into
base: v2-dev
Choose a base branch
from

Conversation

tonyredondo
Copy link
Member

@tonyredondo tonyredondo commented Jan 10, 2025

What does this PR do?

This PR improves the mutability over the environment tags, avoiding to re-running the Cmds (git commands) after adding new tags and avoiding race conditions.

Same PR for main: #3076

Motivation

Currently if we add a new tag we end up by re running the git command to create a new map, this PR fixes this issue.

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.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 10, 2025

Datadog Report

Branch report: tony/civisibility-improve-environment-tags-mutability-v2
Commit report: 58680e8
Test service: dd-trace-go

✅ 0 Failed, 4079 Passed, 64 Skipped, 2m 48.21s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Jan 10, 2025

Benchmarks

Benchmark execution time: 2025-01-10 16:52:34

Comparing candidate commit 78ac03f in PR branch tony/civisibility-improve-environment-tags-mutability-v2 with baseline commit 89bfc59 in branch v2-dev.

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

scenario:BenchmarkInjectW3C-24

  • 🟩 execution_time [-150.726ns; -115.874ns] or [-3.625%; -2.787%]

scenario:BenchmarkSetTagStringer-24

  • 🟩 execution_time [-8.465ns; -3.275ns] or [-5.707%; -2.208%]

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.

1 participant