Skip to content

Commit c6f9664

Browse files
dougqhdevflow.devflow-routing-intake
andauthored
Remove LegacyTagMap; OptimizedTagMap is the sole TagMap implementation (#11678)
Remove LegacyTagMap, its factory abstraction, and the trivial test enums With one implementor, the optimized/legacy split is dead weight. Delete LegacyTagMap and LegacyTagMapFactory; collapse the whole TagMapFactory abstraction (TagMap.create()/create(int)/EMPTY now construct OptimizedTagMap directly via a lazy EmptyHolder that avoids a TagMap<->OptimizedTagMap static-init cycle). OptimizedTagMap is the sole TagMap implementor, satisfying CHA's unique-implementor precondition. Delete the now-trivial TagMapType/TagMapTypePair test enums and de-parameterize their tests to plain @test; TagMapScenario (size-based) stays. Drop stale "legacy and optimized" references from javadoc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Remove the dead optimized.map.enabled config flag The flag only chose between the optimized and legacy TagMap impls; with Legacy gone it controls nothing. Remove the Config field/getter, the GeneralConfig constant, and the metadata/supported-configurations.json entry. Per the Config team, removing the registry entry is detected automatically at the next release (FPD + public docs get a "Max Version: v1.xx.0" marker), so the hard delete is the correct process. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Merge branch 'master' into dougqh/kill-legacy-tagmap Update internal-api/src/main/java/datadog/trace/api/TagMap.java Co-authored-by: Sarah Chen <sarah.chen@datadoghq.com> Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 11646d3 commit c6f9664

9 files changed

Lines changed: 110 additions & 742 deletions

File tree

dd-trace-api/src/main/java/datadog/trace/api/config/GeneralConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public final class GeneralConfig {
118118
public static final String APM_TRACING_ENABLED = "apm.tracing.enabled";
119119
public static final String JDK_SOCKET_ENABLED = "jdk.socket.enabled";
120120

121-
public static final String OPTIMIZED_MAP_ENABLED = "optimized.map.enabled";
122121
public static final String TAG_NAME_UTF8_CACHE_SIZE = "tag.name.utf8.cache.size";
123122
public static final String TAG_VALUE_UTF8_CACHE_SIZE = "tag.value.utf8.cache.size";
124123
public static final String SPAN_BUILDER_REUSE_ENABLED = "span.builder.reuse.enabled";

internal-api/src/main/java/datadog/trace/api/Config.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,6 @@ public static String getHostName() {
13931393

13941394
private final boolean jdkSocketEnabled;
13951395

1396-
private final boolean optimizedMapEnabled;
13971396
private final boolean spanBuilderReuseEnabled;
13981397
private final int tagNameUtf8CacheSize;
13991398
private final int tagValueUtf8CacheSize;
@@ -3247,7 +3246,6 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
32473246

32483247
this.jdkSocketEnabled = configProvider.getBoolean(JDK_SOCKET_ENABLED, true);
32493248

3250-
this.optimizedMapEnabled = configProvider.getBoolean(GeneralConfig.OPTIMIZED_MAP_ENABLED, true);
32513249
this.spanBuilderReuseEnabled =
32523250
configProvider.getBoolean(GeneralConfig.SPAN_BUILDER_REUSE_ENABLED, true);
32533251
this.tagNameUtf8CacheSize =
@@ -5072,10 +5070,6 @@ public boolean isJdkSocketEnabled() {
50725070
return jdkSocketEnabled;
50735071
}
50745072

5075-
public boolean isOptimizedMapEnabled() {
5076-
return optimizedMapEnabled;
5077-
}
5078-
50795073
public boolean isSpanBuilderReuseEnabled() {
50805074
return spanBuilderReuseEnabled;
50815075
}

0 commit comments

Comments
 (0)