Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15283

Remove Solr trace sampling; let Tracer configuration/impl decide

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 9.0
    • None
    • None

    Description

      GlobalTracer should always have the Tracer produced by the TracerConfiguratorPlugin. Solr should not intervene by substituting a no-op version sometimes, and thus needn't have its ThreadLocal tracking either (which doesn't work well). The special samplePercentage cluster property should be removed.

      Background: When someone configures tracing (supplying TracerConfigurator plugin), Solr will "sample" tracing if an incoming request has no tracing information. By default this is 10% and is only configurable via a samplePercentage cluster property. If you're in the 90%, this results in a no-op Tracer – no trace IDs. This is really confusing & annoying because Tracers themselves have notions of sampling, which means "reporting" (sending) the trace to a tracing server where it can be stored/analyzed/visualized. The point of a non-sampled trace is propagating IDs for logging (trace ID in MDC) – very light-weight. Zipkin and Jaeger (and others?) have their own samplers. When Solr receives a request with a trace ID, in Zipkin it also includes the binary sampling decision (it's another header). The expectation is that if the trace says to sample, then this sampling decision is propagated downstream and thus the whole call tree is fully sampled (reported to a server).

      Attachments

        Issue Links

          Activity

            People

              dsmiley David Smiley
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m