0

I'm new to using Jaeger tracing system and have been trying to implement it for a flask based microservices architecture. Below is my jaeger client config implemented in python:

config = Config(
        config = {
                'sampler': {
                'type': 'const',
                'param': 1,
            },
            'logging': True,
            'reporter_batch_size': 1,
            },
            service_name=service,

        )

I read somewhere that Sampling strategy is being used to sample the number of traces especially for the trace which doesn't have any metadata. So as per this config, does it mean that I'm sampling each and every trace or just the few traces randomly? Mysteriously, when I'm passing random inputs to create spans for my microservices, the spans are getting generated only after 4 to 5 minutes. I would like to understand this configuration spec more but not able to.

NightOwl19
  • 419
  • 5
  • 24

1 Answers1

1

So as per this config, does it mean that I'm sampling each and every trace or just the few traces randomly?

Using the sampler type as const with 1 as the value means that you are sampling everything.

Mysteriously, when I'm passing random inputs to create spans for my microservices, the spans are getting generated only after 4 to 5 minutes. I would like to understand this configuration spec more but not able to.

There are several things that might be happening. You might not be closing spans, for instance. I recommend reading the following two blog posts to try to understand what might be happening:

Help! Something is wrong with my Jaeger installation!

The life of a span

jpkroehling
  • 13,881
  • 1
  • 37
  • 39
  • thanks for your answer @jpkrohling. I figured it out what was the problem with my code. Actually, the traces which are being closed only that were getting sampled with jaeger-python-client. I don't know why but I did a very strange fix by keeping the tracer open and not closing it. Anyways, until the function is called again the tracer is flushed and I'm able to report the previous tracer as well as the new one. – NightOwl19 Jan 25 '19 at 10:36