File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/main/java/com/arpnetworking/metrics/proxy Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 37
37
import com .arpnetworking .steno .LogValueMapFactory ;
38
38
import com .arpnetworking .steno .Logger ;
39
39
import com .arpnetworking .steno .LoggerFactory ;
40
+ import com .google .common .collect .ImmutableMap ;
40
41
import com .google .common .collect .Maps ;
41
42
import com .google .common .collect .Sets ;
42
43
import com .google .inject .Inject ;
@@ -207,7 +208,7 @@ private void executeMetricsListRequest() {
207
208
_metrics .incrementCounter (METRICS_LIST_REQUEST );
208
209
209
210
// Transmit a list of all registered metrics
210
- getSender ().tell (new MetricsList (_serviceMetrics ), getSelf ());
211
+ getSender ().tell (new MetricsList (ImmutableMap . copyOf ( _serviceMetrics ) ), getSelf ());
211
212
}
212
213
213
214
private void registerLog (final Path logPath ) {
Original file line number Diff line number Diff line change 19
19
import com .arpnetworking .logback .annotations .Loggable ;
20
20
import com .fasterxml .jackson .annotation .JsonIgnore ;
21
21
import com .google .common .base .MoreObjects ;
22
+ import com .google .common .collect .ImmutableMap ;
22
23
23
24
import java .util .Map ;
24
25
import java .util .Set ;
@@ -38,7 +39,7 @@ public final class MetricsList {
38
39
*
39
40
* @param metrics Metrics map
40
41
*/
41
- public MetricsList (final Map <String , Map <String , Set <String >>> metrics ) {
42
+ public MetricsList (final ImmutableMap <String , Map <String , Set <String >>> metrics ) {
42
43
_metrics = metrics ;
43
44
}
44
45
@@ -60,5 +61,5 @@ public String toString() {
60
61
.toString ();
61
62
}
62
63
63
- private final Map <String , Map <String , Set <String >>> _metrics ;
64
+ private final ImmutableMap <String , Map <String , Set <String >>> _metrics ;
64
65
}
You can’t perform that action at this time.
0 commit comments