Tapper v0.6.0 Tapper.Reporter.AsyncReporter View Source
Reporter that collects spans and forwards them periodically to another reporter.
Sending every sampled trace separately can create a lot of traffic between the application and the Zipkin server when the server is handling a lot of client traffic. Instead this reporter collects the spans and sends them in batches.
Configuration
key | purpose | default/required |
---|---|---|
sender | Reporter to use when reporting a batch; see Tapper.Application for possible reporter forms | Required |
flush_interval | Milliseconds to wait between reporting a new batch of spans | 10000 |
max_spans_threshold | Reaching this number of spans will reset the flush_interval timer and will flush the spans | 1000 |
max_concurrent_flush_count | Number of flushes that can work concurrently before we start discarding new spans | 5 |
e.g.
config :tapper,
system_id: "my-application",
reporter: {Tapper.Reporter.AsyncReporter, []} # start under Tapper supervisor
config :tapper, Tapper.Reporter.AsyncReporter,
flush_interval: 10000,
max_spans_threshold: 1000,
max_concurrent_flush_count: 5,
sender: Tapper.Reporter.Zipkin
# configuration for sender module
config :tapper, Tapper.Reporter.Zipkin,
collector_url: "https://my-zipkin.domain.com:9411/api/v1/spans",
client_opts: [timeout: 10000]
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Flushes collected spans to reporter immediately
Starts this module under a supervisor
Link to this section Functions
child_spec(init_arg) View Source
Returns a specification to start this module under a supervisor.
See Supervisor
.
flush() View Source
Flushes collected spans to reporter immediately.
start_link(opts) View Source
Starts this module under a supervisor.
Normally this is called by the Tapper
application when this module is configured
as the reporter
, using the {Tapper.Reporter.AsyncReporter, []}
syntax.