question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating a follows_from reference

See original GitHub issue

I’m trying to write an implementation, but I’m not sure how to go about implementing follows_from.

It looks like this isn’t implemented in startSpan() in tracer.js.

I’ve had a read through the git history and it looks like this may have been implemented at some point.

Can someone show how this should be done in an implementation, as well as an example of how to use it in practice.

I would expect it to work like this, based on how childOf works.

const parentSpan = tracer.startSpan('parentOperation');
const childSpan = tracer.startSpan('childOperation', { followsFrom: parentSpan });

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yurishkurocommented, Mar 1, 2017

Are you asking as a user of the API or as the implementor of the tracer? For the latter what you have above makes sense, but it’s not part of the official API which only defines fields.childOf, not fields.followsFrom. As a user of the API, you would need to do

tracer.startSpan("operation name", {
    references: [opentracing.followsFrom(parentContext)]
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

ddtrace/opentracer: unable to create FollowsFrom ...
If I'm reading the code (and some issues from the opentracing specification) correctly, FollowsFrom doesn't have a consistent UI/tracer ...
Read more >
opentracing.REFERENCE_FOLLOWS_FROM JavaScript ...
This currently doesn't behave in a logical way as when the followsFrom // reference is being ignored, the agent will simply automatically associate...
Read more >
To help you get started, we've selected a few opentracing ...
it('should start a span that follows from a span', () => { const parent = {} fields.references = [ new Reference(opentracing.REFERENCE_FOLLOWS_FROM ...
Read more >
OpenTracing Compatibility
If a list of Span references is specified, the union of their Baggage values MUST be used as the initial Baggage of the...
Read more >
Overview :: Learning Distributed Tracing 101
The OpenTracing API project is working towards creating more standardized APIs and ... Spans can (and generally do) contain "References" to other spans, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found