Skip to content

Commit 807562b

Browse files
committed
Use UTF-8 for pushing metrics to Prometheus
1 parent fb69873 commit 807562b

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ The following people have contributed to Flowman and are referred to as "The Flo
33
* Kaya Kupferschmidt <[email protected]>
44
* Siegfried Weber <[email protected]>
55
* Jacek Kmiecik
6+
* Lukas Senicourt

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ Breaking changes will be documented in this changelog file for each version.
1818

1919
# Changelog
2020

21+
## Version 1.3.2
22+
23+
* Fix documentation of SQL mapping
24+
*
25+
26+
2127
## Version 1.3.1 - 2024-12-19
2228

2329
* github-514: Generated SQL code for views should quote all column names

flowman-spec/src/main/scala/com/dimajix/flowman/spec/metric/PrometheusMetricSink.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ package com.dimajix.flowman.spec.metric
1818

1919
import java.io.IOException
2020
import java.net.URI
21+
import java.nio.charset.Charset
2122

2223
import scala.util.control.NonFatal
2324

2425
import com.fasterxml.jackson.annotation.JsonProperty
26+
import org.apache.http.Consts
2527
import org.apache.http.HttpResponse
2628
import org.apache.http.client.HttpResponseException
2729
import org.apache.http.client.ResponseHandler
@@ -90,9 +92,9 @@ extends AbstractMetricSink with Logging {
9092

9193
val httpClient = HttpClients.createDefault()
9294
try {
93-
val httpPost = new HttpPut(url)
94-
httpPost.setEntity(new StringEntity(payload))
95-
httpClient.execute(httpPost, handler)
95+
val httpPut = new HttpPut(url)
96+
httpPut.setEntity(new StringEntity(payload, Consts.UTF_8))
97+
httpClient.execute(httpPut, handler)
9698
}
9799
catch {
98100
case ex:HttpResponseException =>

0 commit comments

Comments
 (0)