Skip to content
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

Prevent endless loop if tracer sends each span separately via HTTP #9

Open
cwe1ss opened this issue Mar 14, 2018 · 1 comment
Open
Labels
bug Something isn't working

Comments

@cwe1ss
Copy link
Collaborator

cwe1ss commented Mar 14, 2018

As every HTTP call creates a new span, there could be an endless loop if a tracer sends each span separately (for whatever reason) to its backend system.

The only way to prevent this right now is to tell the HTTP instrumentation that those tracer HTTP calls should not be traced. This can be done in two ways:

  • There's a built-in rule that ignores requests that contain a request property key called ot-ignore. Ideally, this would automatically be set by the tracer. If the tracer allows passing a custom DelegatingHandler a user can also set this himself for each request via:
request.Properties["ot-ignore"] = true;
  • Adding a custom rule that ignores these requests based on their URL. This can be done in ConfigureServices via the following example:
services.Configure<HttpHandlerDiagnosticOptions>(options =>
{
    options.IgnorePatterns.Add(request => request.RequestUri == _tracerUri);
});

Maybe there is a way to prevent this scenario even if none of these things have been done?!

@cwe1ss cwe1ss added the bug Something isn't working label Mar 14, 2018
@bocharovf
Copy link

Fixed for Jaeger's HttpSender. See jaegertracing/jaeger-client-csharp#154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants