Skip to content

Commit

Permalink
Bug 1672992 Modify main ping payloads when writing to BQ
Browse files Browse the repository at this point in the history
  • Loading branch information
jklukas committed Dec 9, 2020
1 parent 789bf75 commit 3c3c03c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,15 @@ public ObjectNode apply(TableId tableId, Map<String, String> attributes, byte[]
if (additionalProperties != null) {
contents.put(FieldName.ADDITIONAL_PROPERTIES, Json.asString(additionalProperties));
}

// TODO: REMOVE! This exists only for testing as described in Bug 1672992
if ("telemetry".equals(attributes.get(Attribute.DOCUMENT_NAMESPACE))
&& "main".equals(attributes.get(Attribute.DOCUMENT_TYPE))) {
ObjectNode payload = (ObjectNode) contents.path("payload");
JsonNode histograms = payload.path("histograms");
payload.set("histograms2", histograms);
}

return contents;
}

Expand Down

0 comments on commit 3c3c03c

Please sign in to comment.