File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
internal-api/src/main/java/datadog/trace/api Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -138,15 +138,19 @@ public static UTF8BytesString getTagsForSerialization() {
138138
139139 /** Visible for testing. */
140140 static void empty () {
141- Lazy .TAGS .clear ();
142- Lazy .serializedForm = null ;
143- Lazy .listForm = null ;
141+ synchronized (Lazy .TAGS ) {
142+ Lazy .TAGS .clear ();
143+ Lazy .serializedForm = null ;
144+ Lazy .listForm = null ;
145+ }
144146 }
145147
146148 /** Visible for testing. */
147149 static void reset () {
148- empty ();
149- enabled = Config .get ().isExperimentalPropagateProcessTagsEnabled ();
150- Lazy .TAGS .putAll (Lazy .loadTags ());
150+ synchronized (Lazy .TAGS ) {
151+ empty ();
152+ enabled = Config .get ().isExperimentalPropagateProcessTagsEnabled ();
153+ Lazy .TAGS .putAll (Lazy .loadTags ());
154+ }
151155 }
152156}
You can’t perform that action at this time.
0 commit comments