-
Notifications
You must be signed in to change notification settings - Fork 242
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
[OTel]: Spans produced by spin_sdk::key_value::Store::set
don't have a parent assigned
#2525
Comments
Quick update on behalf of @calebschoepp: this seems to be a bug in |
@ThorstenHans please try setting |
@calebschoepp I stumbled upon this as part of orchestrating a distributed application with .NET Aspire. Aspire specifies the I think I could modify the overall Otel configuration manually, but it would be beneficial to get this fixes at some point without having users to modify standard behavior of Otel. |
@calebschoepp you can reproduce the behavior by running the sample at https://github.com/fermyon/Aspire.Spin cd example/host
export ASPIRE_ALLOW_UNSECURED_TRANSPORT=true
dotnet run -lp http
curl http://localhost:3002
|
Thanks @ThorstenHans. Turns out we don't even need aspire to repro this. The following app repros the issue: use spin_sdk::http::{IntoResponse, Request, Response};
use spin_sdk::http_component;
use spin_sdk::key_value::Store;
#[http_component]
fn handle_api(req: Request) -> anyhow::Result<impl IntoResponse> {
let store = Store::open_default()?;
store.get("foo")?;
store.set("bar", b"baz")?;
Ok(Response::builder()
.status(200)
.header("content-type", "text/plain")
.build())
} When Spent all of yesterday trying to hunt this bug down and still didn't have any luck. |
I remember times when I had similar problems with distributed tracing in dapr sdk for go... I'll check if I can find the corresponding issue... maybe we get some information or hint from that one |
Maybe it's worth having a look @calebschoepp dapr/go-sdk#355 |
Small update: This is not an issue on the old Go and JS SDKs. No clue why it isn't an issue there, but maybe this is a hint that can help us. |
How old? |
@karthik2804 can you provide the versions of the SDKs we were testing with please? |
The go sdk - |
Spans produced as part of using the key-value store
set
function, don't have a parent assigned. This results in having two independent traces from a single HTTP API invocationI've tested other actions in the context of key-value store (such as
exists
and `get) which are all represented correctly:Versions
spin
CLI:spin 2.5.1 (cba6773 2024-05-14)
spin-sdk
crate:3.0.1
Repro
See the following pseudo code for reproducing the behavior:
The text was updated successfully, but these errors were encountered: