Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: unclear how to setup http(hyper) without agent pipeline #1659

Open
ibigbug opened this issue Apr 9, 2024 · 3 comments · Fixed by #1756
Open

[Bug]: unclear how to setup http(hyper) without agent pipeline #1659

ibigbug opened this issue Apr 9, 2024 · 3 comments · Fixed by #1756
Labels
bug Something isn't working triage:todo Needs to be traiged.

Comments

@ibigbug
Copy link

ibigbug commented Apr 9, 2024

What happened?

opentelemetry = "0.22"
opentelemetry_sdk = { version = "0.22", features = ["rt-tokio"] }
tracing-opentelemetry = "0.23"
opentelemetry-jaeger-propagator = "0.1.0"
opentelemetry-jaeger = { version = "0.21", features = ["collector_client", "hyper_collector_client", "rt-tokio"] }
opentelemetry-otlp = { version = "0.15.0", features = ["http-proto"] }

these are the enabled features

global::set_text_map_propagator(opentelemetry_jaeger_propagator::Propagator::new());

        let otlp_exporter = opentelemetry_otlp::new_exporter()
            .http()
            .with_endpoint(jager_endpoint);
        let tracer =
            opentelemetry_otlp::new_pipeline()
                .tracing()
                .with_exporter(otlp_exporter)
                .with_trace_config(trace::config().with_resource(Resource::new(vec![
                    KeyValue::new("service.name", "clash-rs"),
                ])))
                .install_batch(opentelemetry_sdk::runtime::Tokio)?;

these are the setup

problem is

failed to setup logging: Exporter otlp encountered the following error(s): no http client, you must select one from features or provide your own implementation

how do i active the default hyper client?

ty

API Version

x

SDK Version

x

What Exporters are you seeing the problem on?

No response

Relevant log output

No response

@ibigbug ibigbug added bug Something isn't working triage:todo Needs to be traiged. labels Apr 9, 2024
@cijothomas
Copy link
Member

This is not resolved, as shown here : #1756 (comment)

@ibigbug
Copy link
Author

ibigbug commented May 28, 2024

125 |         Some(tracing_opentelemetry::layer().with_tracer(tracer))
    |                                             ----------- ^^^^^^ the trait `PreSampledTracer` is not implemented for `opentelemetry_sdk::trace::Tracer`
    |                                             |
    |                                             required by a bound introduced by this call
    |

how to have PreSampledTracer implemented for a tracer below?

   let tracer = opentelemetry_otlp::new_pipeline()
            .tracing()
            .with_exporter(otlp_exporter)
            .with_trace_config(
                trace::config()
                    .with_sampler(Sampler::AlwaysOn)
                    .with_resource(Resource::new(vec![KeyValue::new(
                        "service.name",
                        "clash-rs",
                    )])),
            )
            .install_batch(opentelemetry_sdk::runtime::Tokio)?;

I'm getting new API compatibility issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage:todo Needs to be traiged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants