Skip to content

Commit

Permalink
Use UTF-8 for pushing metrics to Prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
kupferk committed Jan 10, 2025
1 parent fb69873 commit 807562b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ The following people have contributed to Flowman and are referred to as "The Flo
* Kaya Kupferschmidt <[email protected]>
* Siegfried Weber <[email protected]>
* Jacek Kmiecik
* Lukas Senicourt
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ Breaking changes will be documented in this changelog file for each version.

# Changelog

## Version 1.3.2

* Fix documentation of SQL mapping
*


## Version 1.3.1 - 2024-12-19

* github-514: Generated SQL code for views should quote all column names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ package com.dimajix.flowman.spec.metric

import java.io.IOException
import java.net.URI
import java.nio.charset.Charset

import scala.util.control.NonFatal

import com.fasterxml.jackson.annotation.JsonProperty
import org.apache.http.Consts
import org.apache.http.HttpResponse
import org.apache.http.client.HttpResponseException
import org.apache.http.client.ResponseHandler
Expand Down Expand Up @@ -90,9 +92,9 @@ extends AbstractMetricSink with Logging {

val httpClient = HttpClients.createDefault()
try {
val httpPost = new HttpPut(url)
httpPost.setEntity(new StringEntity(payload))
httpClient.execute(httpPost, handler)
val httpPut = new HttpPut(url)
httpPut.setEntity(new StringEntity(payload, Consts.UTF_8))
httpClient.execute(httpPut, handler)
}
catch {
case ex:HttpResponseException =>
Expand Down

0 comments on commit 807562b

Please sign in to comment.