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.

Opentracing integration not working for Context-Only Spans

See original GitHub issue

We have been working on integrating ElasticAPM with Lightbend’s commercial tracing solution called Cinnamon.

Cinnamon is able to use the OpenTracing bridge from ElasticAPM to integrate but has the following issues:

We have looked deeper and found a few issues that prevented Cinnamon work with Elastic APM tracer correctly.

The main issue is that Cinnamon has a special context-only propagation mode that is not supported by Elastic APM tracer.
Cinnamon uses context-only propagation in many cases to avoid creating too many spans.
And the only way to let Elastic APM tracer know of the new context is to create a new active span.

In order to achieve that Cinnamon uses a context-only spans. It's a dummy Span implementation that is never reported and used for span context propagation only.
The problem is that Elastic APM tracer can't activate such context-only spans even though it works with other tracers including Zipkin, Jaeger, or Datadog.
Elastic APM tracer expects only ApmSpan otherwise it will throw class cast exception thus we introduced the `activate-context-only-spans` setting to be able to disable active-only spans. We can't implement it on our side because it will require creating a dummy AbstractSpans that are internal Elastic APM classes and are not part of its API.

If Elastic APM supported such context-only spans then Cinnamon would be able to propagate context in context-only mode as it does with other tracers.

Cinnamon also supports auto-trace mode that creates a span every time it activates context. It will work to solve this issue but is not practical to use because it will produce too many spans for each stream stage and for all the futures. It's meant to be used for debugging purposes.

As an alternative solution Cinnamon also supports a special type of spans that we call span continuations. Basically, it's an active span that is kept unfinished while it has references to it. So, when there is no active span it uses the continuation span. It should fix the current issue with context propagation in your example but it also has some limitations and won't fix all possible problems with context propagation. So, for a better universal solution, we need Elastic APM tracer support context-only spans as described above.

Let me know if something is unclear and I can provide more information 😃

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
milanvdmcommented, Aug 11, 2020

@felixbarny Sorry, I meant I was doubtful on performance on the way it currently is, not on the way that you suggested 😃

1reaction
milanvdmcommented, Jul 26, 2020

@eyalkoren I think so yes based on https://developer.lightbend.com/docs/telemetry/current/extensions/opentracing/compatibility.html

I’ll try to get more information to answer your question 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling OpenTracing in your app • Lightbend Telemetry
For example, when “context-only” spans have to be disabled because they are not supported by some tracers such as ElasticAPM. See OpenTracing compatibility ......
Read more >
OpenSkywalking/Lobby - Gitter
error: The following untracked working tree files would be overwritten by checkout: .github/ISSUE_TEMPLATE .github/PULL_REQUEST_TEMPLATE .gitignore
Read more >
Talend Component Kit Developer Reference Guide :: - GitHub Pages
... component-server TCOMP-2147: Decrease log level for blacklisted dependenCIes component-manager TCOMP-2228: Upgrade git-commit-id-plugin to 4.9.10 ...
Read more >
How To Fix Partial Results Appearing In Cinnamon Lightbend ...
The OpenTracing integration includes APIs for attaching additional ... MongoDBSystem The entire node set is unreachable is there a network problem?
Read more >
Do Not Log | Hacker News
In the end, to integrate Sentry and get actually useful information for monitoring, you have to do the same work you'd do for...
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