Skip to content

Commit f7776e9

Browse files
committed
use limit enforcing map in TelemetryContext
1 parent fdb0eaa commit f7776e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/main/java/com/microsoft/applicationinsights/telemetry/BaseTelemetry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected BaseTelemetry() {
5555
* @param properties The context properties
5656
*/
5757
protected void initialize(ConcurrentMap<String, String> properties) {
58-
this.context = new TelemetryContext(properties, new ConcurrentHashMap<String, String>());
58+
this.context = new TelemetryContext(properties, new ContextTagsMap());
5959
}
6060

6161
public abstract int getVer();

core/src/main/java/com/microsoft/applicationinsights/telemetry/TelemetryContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
public final class TelemetryContext {
4747
private ConcurrentMap<String,String> properties;
48-
private ConcurrentMap<String,String> tags;
48+
private ContextTagsMap tags;
4949

5050
private String instrumentationKey;
5151
private ComponentContext component;
@@ -61,7 +61,7 @@ public final class TelemetryContext {
6161
* Default Ctor
6262
*/
6363
public TelemetryContext() {
64-
this(new ConcurrentHashMap<String, String>(), new ConcurrentHashMap<String, String>());
64+
this(new ConcurrentHashMap<String, String>(), new ContextTagsMap());
6565
}
6666

6767
/**
@@ -212,7 +212,7 @@ public InternalContext getInternal() {
212212
return internal;
213213
}
214214

215-
TelemetryContext(ConcurrentMap<String, String> properties, ConcurrentMap<String, String> tags) {
215+
TelemetryContext(ConcurrentMap<String, String> properties, ContextTagsMap tags) {
216216
if (properties == null) {
217217
throw new IllegalArgumentException("properties cannot be null");
218218
}

0 commit comments

Comments
 (0)