Send telemetry to Honeycomb via GRPC

We updated the core-foundation crates because Tonic (the GRPC crate) relies on a newer version of core foundation to find TLS root certificates.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo 2022-04-27 09:58:55 -06:00
parent 2db20c4364
commit 36b462182b
5 changed files with 74 additions and 28 deletions

View file

@ -142,9 +142,12 @@ pub fn init_tracing(config: &Config) -> Option<()> {
.with_exporter(
opentelemetry_otlp::new_exporter()
.tonic()
.with_endpoint("api.honeycomb.io:443")
.with_endpoint("https://api.honeycomb.io")
.with_metadata(metadata),
)
.with_trace_config(opentelemetry::sdk::trace::config().with_resource(
opentelemetry::sdk::Resource::new(vec![KeyValue::new("service.name", "collab")]),
))
.install_batch(opentelemetry::runtime::Tokio)
.expect("failed to initialize tracing");