Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Update the ReporterConfig to set Sender Correctly (#370)
Browse files Browse the repository at this point in the history
A small bug in the private getReporter(..) method was resulting in the sender
always being set to the default UdpSender. This is because the field
`senderConfiguration.sender` is null until the `getSender()` method is called on
it. Because the reporter builder was accessing the field directly rather than
through the getter, it was always UdpSen a null sender, thus defaulting to the
UdpSender even if the JAEGER_ENDPOINT property was set.

This commit fixes the problem, accessing the configured sender through the
appropriate getter, allowing the user configurations to propagate through to the
tracer retrieved via the `Configuration.fromEnv().getTracer()` method.

Signed-off-by: Nate Hart <nhart@tableau.com>
  • Loading branch information
natehart authored and yurishkuro committed Mar 16, 2018
1 parent 368bf5a commit ee137d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ public ReporterConfiguration withSender(SenderConfiguration senderConfiguration)
private Reporter getReporter(Metrics metrics) {
Reporter reporter = new RemoteReporter.Builder()
.withMetrics(metrics)
.withSender(senderConfiguration.sender)
.withSender(senderConfiguration.getSender())
.withFlushInterval(numberOrDefault(this.flushIntervalMs, RemoteReporter.DEFAULT_FLUSH_INTERVAL_MS).intValue())
.withMaxQueueSize(numberOrDefault(this.maxQueueSize, RemoteReporter.DEFAULT_MAX_QUEUE_SIZE).intValue())
.build();
Expand Down

0 comments on commit ee137d6

Please sign in to comment.