opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

Can't seem to get opentelemetry-datadog to work with batch mode

Open rex-remind101 opened this issue 2 years ago • 3 comments

.install_simple works fine, I receive traces in DataDog APM, however, .install_batch(opentelemetry::runtime::AsyncStd) seems to produce no traces, but there are no error logs either.

I can't use runtime::Tokio because actix-web stable (0.3) has not updated to 1.0 which is what is used by opentelemetry, and we use actix-web stable, we receive there is no reactor running, must be called from the context of a Tokio 1.x runtime.

Here are relevant parts of our Cargo.toml.

[dependencies]
actix-rt = "2.5.1"
async-std = { version = "1.10", features = ["attributes"] }
async-trait = { version = "0.1.52" }
actix-web = "3.3.3"
async-recursion = "1.0.0"
futures = { version = "0.3" }
opentelemetry = { version = "0.17.0", features = ["rt-async-std"] }
opentelemetry-datadog = { version = "0.5.0", features = ["surf-client"] }
# For opentelemetry-datadog.
surf = { version = "2.3.2", features = ["default-client"] }

providing features = ["rt-async-std"] I had assumed would work. Any suggestions?

rex-remind101 avatar Feb 08 '22 06:02 rex-remind101

Update, I attempted to update actix-web to 4-rc3 and use tokio batch exporter. However, using http://dd_agent_host:8126 still failed to send traces. In the logs I see

OpenTelemetry trace error occurred. Curl(“Send failed since rewinding of the data stream failed”): Send failed since rewinding of the data stream failed

what is it that I am doing wrong?

rex-remind101 avatar Feb 08 '22 23:02 rex-remind101

this looks like you may need to replace http:// with https:// ? https://kb.tableau.com/articles/issue/error-send-failed-since-rewinding-of-the-data-stream-failed-publishing-workbook

hdost avatar Feb 09 '22 00:02 hdost

I had seen that as well, but the DataDog agent uses http, I've confirmed this through a couple channels, so the root cause must be something else.

rex-remind101 avatar Feb 09 '22 00:02 rex-remind101