You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2023. It is now read-only.
I'm struggling to see how to manually set a span's parent in the JS library
var tracer = tracingManager.getTracer();
const appStartupSpan = tracer.startSpan("AppStartup");
appStartupSpan.addEvent("IronHide starting");
// Some time later in
var childSpan = tracingManager.startSpan('AppStartup-ConnectToMetricsDatabase');
Reason for doing this is I have a node app, as soon as it loads I'd like to create a span called "AppStartup" so I know that process has started, however after several additional steps are done as part of startup that I can't wrap into a single execution function etc.
Ideally I can get the parents spanId and use that to manually connect spans I explicitly know are children of this span. I believe this works even when the parent span has already finished. This way I can tie together the 5 or so services that independently start but would be super useful to tie together under the AppStartup.
Looking at the source for tracer.startSpan I believe it would be reasonable to add a spanParentId onto the option object which overrides everything else.
Happy to create a PR.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm struggling to see how to manually set a span's parent in the JS library
Reason for doing this is I have a node app, as soon as it loads I'd like to create a span called "AppStartup" so I know that process has started, however after several additional steps are done as part of startup that I can't wrap into a single execution function etc.
Ideally I can get the parents spanId and use that to manually connect spans I explicitly know are children of this span. I believe this works even when the parent span has already finished. This way I can tie together the 5 or so services that independently start but would be super useful to tie together under the AppStartup.
Looking at the source for tracer.startSpan I believe it would be reasonable to add a spanParentId onto the option object which overrides everything else.
Happy to create a PR.
The text was updated successfully, but these errors were encountered: