Skip to content

OpenTelemetry otlp not sending traces or metrics #1790

Closed Answered by lmtr0
lmtr0 asked this question in Q&A
Discussion options

You must be logged in to vote

For anybody suffering from the same problem I was (I'll admit, I'm working on this since Friday, and I've expressed my frustration on this post).

here is my final config that works as expected (only for traces):
telemetry.rs:

use anyhow::Context;
use opentelemetry::trace::TracerProvider;
use opentelemetry::KeyValue;
use opentelemetry_otlp::{Protocol, TonicExporterBuilder, WithExportConfig};
use opentelemetry_sdk::metrics::SdkMeterProvider;
use opentelemetry_sdk::resource::Resource;
use opentelemetry_sdk::runtime;
use opentelemetry_sdk::trace::{BatchConfig, RandomIdGenerator, Sampler};
use std::time::Duration;
use tracing::instrument::WithSubscriber;
use tracing::level_filters::LevelFilter;

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@lmtr0
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lmtr0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant