You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use the Rust SDK from within vector to send metrics, without instrumenting the rest of the app.
This example does not send anything:
use sentry::{metrics::Metric, ClientOptions};
use std::time::Duration;
# does not send any metric
fn main() {
let client = sentry::Client::from_config("...");
let metric = Metric::incr("hello-with-global", 2.0).finish();
client.add_metric(metric);
client.flush(Some(Duration::from_secs(1)));
}
I can verify using mitmproxy that there's no HTTP request leaving the process.
the only version that works is one where MetricBuilder::send and sentry::init are used:
# sends a metric
fn main() {
let _guard = sentry::init("...");
Metric::incr("hello", 2.0).send();
}
SDK version 0.32.1
The text was updated successfully, but these errors were encountered:
is there a workaround for this issue?
I'm not 100% certain I'm hitting it, but I want to send metrics without having to use the global hub
( we have a small service that converts logs to sentry errors & messages )
that wasn't the issue, I can use Client::add_metric directly, and data is transferred. I didn't test explicit flushing
I would like to use the Rust SDK from within vector to send metrics, without instrumenting the rest of the app.
This example does not send anything:
I can verify using mitmproxy that there's no HTTP request leaving the process.
the only version that works is one where
MetricBuilder::send
andsentry::init
are used:SDK version 0.32.1
The text was updated successfully, but these errors were encountered: