Skip to content

Commit

Permalink
finishing touches
Browse files Browse the repository at this point in the history
  • Loading branch information
pirgeo committed Sep 7, 2023
1 parent 289c684 commit 99e12cc
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ public final class DynatraceExporterV2 extends AbstractDynatraceExporter {
private static final Map<String, String> staticDimensions = Collections.singletonMap("dt.metrics.source",
"micrometer");

private static final int MINIMUM_CAPACITY = 64;

// This should be non-static for MockLoggerFactory.injectLogger() in tests.
private final InternalLogger logger = InternalLoggerFactory.getInstance(DynatraceExporterV2.class);

Expand Down Expand Up @@ -127,9 +125,9 @@ private boolean shouldIgnoreToken(DynatraceConfig config) {
}

private Map<String, String> enrichWithMetricsSourceDimension(Map<String, String> defaultDimensions) {
LinkedHashMap<String, String> orderDimensions = new LinkedHashMap<>(defaultDimensions);
orderDimensions.putAll(staticDimensions);
return orderDimensions;
LinkedHashMap<String, String> orderedDimensions = new LinkedHashMap<>(defaultDimensions);
orderedDimensions.putAll(staticDimensions);
return orderedDimensions;
}

/**
Expand Down Expand Up @@ -502,7 +500,7 @@ private String extractMetricKey(String metadataLine) {
return null;
}

StringBuilder metricKey = new StringBuilder(MINIMUM_CAPACITY);
StringBuilder metricKey = new StringBuilder(32);

for (int i = 1; i < metadataLine.length(); i++) {
char c = metadataLine.charAt(i);
Expand Down

0 comments on commit 99e12cc

Please sign in to comment.