|
36 | 36 | public final class SplitClientImpl implements SplitClient { |
37 | 37 | public static final SplitResult SPLIT_RESULT_CONTROL = new SplitResult(Treatments.CONTROL, null); |
38 | 38 |
|
39 | | - private static final String METRIC_GET_TREATMENT = "sdk.getTreatment"; |
40 | | - private static final String METRIC_GET_TREATMENT_WITH_CONFIG = "sdk.getTreatmentWithConfig"; |
| 39 | + private static final String GET_TREATMENT = "getTreatment"; |
| 40 | + private static final String GET_TREATMENT_WITH_CONFIG = "getTreatmentWithConfig"; |
41 | 41 |
|
42 | 42 | private static final Logger _log = LoggerFactory.getLogger(SplitClientImpl.class); |
43 | 43 |
|
@@ -75,27 +75,27 @@ public String getTreatment(String key, String split) { |
75 | 75 |
|
76 | 76 | @Override |
77 | 77 | public String getTreatment(String key, String split, Map<String, Object> attributes) { |
78 | | - return getTreatmentWithConfigInternal(METRIC_GET_TREATMENT, key, null, split, attributes, "getTreatment").treatment(); |
| 78 | + return getTreatmentWithConfigInternal(GET_TREATMENT, key, null, split, attributes).treatment(); |
79 | 79 | } |
80 | 80 |
|
81 | 81 | @Override |
82 | 82 | public String getTreatment(Key key, String split, Map<String, Object> attributes) { |
83 | | - return getTreatmentWithConfigInternal(METRIC_GET_TREATMENT, key.matchingKey(), key.bucketingKey(), split, attributes, "getTreatment").treatment(); |
| 83 | + return getTreatmentWithConfigInternal(GET_TREATMENT, key.matchingKey(), key.bucketingKey(), split, attributes).treatment(); |
84 | 84 | } |
85 | 85 |
|
86 | 86 | @Override |
87 | 87 | public SplitResult getTreatmentWithConfig(String key, String split) { |
88 | | - return getTreatmentWithConfigInternal(METRIC_GET_TREATMENT_WITH_CONFIG, key, null, split, Collections.<String, Object>emptyMap(), "getTreatmentWithConfig"); |
| 88 | + return getTreatmentWithConfigInternal(GET_TREATMENT_WITH_CONFIG, key, null, split, Collections.<String, Object>emptyMap()); |
89 | 89 | } |
90 | 90 |
|
91 | 91 | @Override |
92 | 92 | public SplitResult getTreatmentWithConfig(String key, String split, Map<String, Object> attributes) { |
93 | | - return getTreatmentWithConfigInternal(METRIC_GET_TREATMENT_WITH_CONFIG, key, null, split, attributes, "getTreatmentWithConfig"); |
| 93 | + return getTreatmentWithConfigInternal(GET_TREATMENT_WITH_CONFIG, key, null, split, attributes); |
94 | 94 | } |
95 | 95 |
|
96 | 96 | @Override |
97 | 97 | public SplitResult getTreatmentWithConfig(Key key, String split, Map<String, Object> attributes) { |
98 | | - return getTreatmentWithConfigInternal(METRIC_GET_TREATMENT_WITH_CONFIG, key.matchingKey(), key.bucketingKey(), split, attributes, "getTreatmentWithConfig"); |
| 98 | + return getTreatmentWithConfigInternal(GET_TREATMENT_WITH_CONFIG, key.matchingKey(), key.bucketingKey(), split, attributes); |
99 | 99 | } |
100 | 100 |
|
101 | 101 | @Override |
@@ -178,7 +178,7 @@ private boolean track(Event event) { |
178 | 178 | return _eventClient.track(event, propertiesResult.getEventSize()); |
179 | 179 | } |
180 | 180 |
|
181 | | - private SplitResult getTreatmentWithConfigInternal(String label, String matchingKey, String bucketingKey, String split, Map<String, Object> attributes, String method) { |
| 181 | + private SplitResult getTreatmentWithConfigInternal(String method, String matchingKey, String bucketingKey, String split, Map<String, Object> attributes) { |
182 | 182 | try { |
183 | 183 | if (_container.isDestroyed()) { |
184 | 184 | _log.error("Client has already been destroyed - no calls possible"); |
@@ -215,7 +215,7 @@ private SplitResult getTreatmentWithConfigInternal(String label, String matching |
215 | 215 | split, |
216 | 216 | start, |
217 | 217 | result.treatment, |
218 | | - label, |
| 218 | + String.format("sdk.%s", method), |
219 | 219 | _config.labelsEnabled() ? result.label : null, |
220 | 220 | result.changeNumber, |
221 | 221 | attributes |
|
0 commit comments