Skip to content

Commit

Permalink
SED-1456 wrong list of attributes used for ingestion
Browse files Browse the repository at this point in the history
  • Loading branch information
david-stephan committed Oct 12, 2022
1 parent 6c9c098 commit 5795566
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ public void processMeasurement(Measurement measurement) {
long value = measurement.getValue();

BucketAttributes bucketAttributes = measurementToBucketAttributes(measurement);
removeKeys(bucketAttributes,"rnId", "origin", "planId", "agentUrl", "id", "begin", "value");
bucketAttributes.put(METRIC_TYPE_KEY, METRIC_TYPE_RESPONSE_TIME);
// custom fields include all the attributes like execId and planId
this.ingestionPipeline.ingestPoint(bucketAttributes, begin, value);
}

Expand All @@ -62,19 +60,11 @@ private BucketAttributes measurementToBucketAttributes(Measurement measurement)
return new BucketAttributes(bucketAttributesMap);
}

private void removeKeys(Map<String, String> map, String... attributes) {
for (String attribute : attributes) {
map.remove(attribute);
}
}

@Override
public void processGauges(List<Measurement> measurements) {
measurements.forEach(measurement -> {
if (measurement != null && measurement.getType().equals(THREAD_GROUP_MEASUREMENT_TYPE)) {
BucketAttributes bucketAttributes = measurementToBucketAttributes(measurement);
bucketAttributes.remove("taskId");
bucketAttributes.remove("type");
bucketAttributes.put(METRIC_TYPE_KEY, METRIC_TYPE_SAMPLER);
this.ingestionPipeline.ingestPoint(bucketAttributes, measurement.getBegin(), measurement.getValue());
}
Expand Down

0 comments on commit 5795566

Please sign in to comment.