temp export tracing
test-org/integration-module/pipeline/pr-rc This commit looks good
Details
test-org/integration-module/pipeline/pr-rc This commit looks good
Details
parent
9e2e5896ef
commit
67868f4438
|
|
@ -4,7 +4,7 @@ use reqwest::Client;
|
|||
use tokio_postgres::NoTls;
|
||||
use std::env;
|
||||
use anyhow::Result;
|
||||
use log::{info, error};
|
||||
use log::{debug, error, info};
|
||||
use std::ops::Drop;
|
||||
|
||||
/// An entity which handles DB connections.
|
||||
|
|
@ -99,6 +99,8 @@ impl Exporter {
|
|||
pub async fn export_metrics(metrics: PrometheusMetrics) -> Result<usize> {
|
||||
let url = env::var("EXPORTER_URL")?;
|
||||
|
||||
debug!("Exporting: {:?}", &metrics);
|
||||
|
||||
let req = Client::new()
|
||||
.post(url)
|
||||
.json(&metrics)
|
||||
|
|
@ -111,6 +113,9 @@ impl Exporter {
|
|||
/// as env var $EXORPTER_URL
|
||||
pub async fn export_extended_metrics(metrics: PrometheusMetricsExtended) -> Result<usize> {
|
||||
let url = env::var("EXPORTER_URL")?;
|
||||
|
||||
debug!("Exporting: {:?}", &metrics);
|
||||
|
||||
let req = Client::new()
|
||||
.post(url)
|
||||
.json(&metrics)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ pub async fn setup_logger() -> Result<()> {
|
|||
record.args(),
|
||||
)
|
||||
})
|
||||
.filter(None, LevelFilter::Info)
|
||||
.filter(None, LevelFilter::Debug)
|
||||
.target(env_logger::Target::Stdout)
|
||||
.init();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue