Skip to content

Commit

Permalink
fix string format in slack alert notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonArp committed May 15, 2023
1 parent 60ff811 commit 28bb856
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ public CompletionStage<Void> notify(final Alert alert, final AlertEvaluationResu
DateTimeFormatter.RFC_1123_DATE_TIME.format(result.getQueryEndTime().atZone(ZoneOffset.UTC))
));

message.append("Firing tags:%n");
message.append("----------------%n");
message.append(String.format("Firing tags:%n"));
message.append(String.format("----------------%n"));
for (final ImmutableMap<String, String> tag : result.getFiringTags()) {
for (final Map.Entry<String, String> entry : tag.entrySet()) {
message.append(String.format(
"%s: %s%n%n",
entry.getKey(),
entry.getValue()));
}
message.append("----------------%n");
message.append(String.format("----------------%n"));
}

final ObjectNode object = Json.newObject()
Expand Down

0 comments on commit 28bb856

Please sign in to comment.