Gerhard Stöbich

Results 195 comments of Gerhard Stöbich

`AsyncLocalStore` is on no help here as there is no 1:1 mapping of a span to an `AsyncResource`. Also ending all spans at the end of a request would be...

There were quite complex node.js applications before `await` was part of the language. Anyhow, in node.js quite some effort was made to utilize the promise hooks exposed by v8 to...

I would assume that a button click is signaled by some `onClick` callback somewhere. And this would the function you are looking for. This function might trigger a lot async...

Could you please mark the places in above code where a specific span should be set as active and where should it be set as inactive?

Is this all sync? activating a context/span requires a deactivate on the sync code path before leaving area/tick where the corresponding work is done otherwise this potentially leaks into other,...

There is no such API. Above samples show why: It allows to activate a context but do not deactivate it on the sync code path which results in very hard...

There is a difference between the point in time where `startSpan`/`endSpan` is called and when a context is activated/deactivated. spans are started when some "operations" begins and ended when it...

There is no need to end a span as last step of `.with()`. ```js tracer.startActiveSpan("root", (rootSpan) => { const s1 = tracer.startSpan("s1"); const ctx1 = api.trace.setSpan(api.ROOT_CONTEXT, s1); const s2 =...

If I understand you proposed correct `api.context.enter(contextWithSpanSet, span)` picks up the current active context and the returned function sets this as active once called. Are you sure that restoring this...

The tsconfig file used here doesn't specify which lib to use. As a result the ts defaults are used based on `target` and this includes `dom`. I created https://github.com/open-telemetry/opentelemetry-js/issues/3257 recently...