Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit 4436862

Browse files
Michael Hoffmannsongy23
authored andcommitted
initial commit (#1799)
1 parent 4859247 commit 4436862

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerExporterHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.google.common.primitives.Longs;
2727
import com.google.errorprone.annotations.MustBeClosed;
2828
import io.jaegertracing.internal.exceptions.SenderException;
29-
import io.jaegertracing.thrift.internal.senders.HttpSender;
29+
import io.jaegertracing.thrift.internal.senders.ThriftSender;
3030
import io.jaegertracing.thriftjava.Log;
3131
import io.jaegertracing.thriftjava.Process;
3232
import io.jaegertracing.thriftjava.Span;
@@ -150,10 +150,10 @@ public Tag apply(final Object value) {
150150
private final byte[] traceIdBuffer = new byte[TraceId.SIZE];
151151
private final byte[] optionsBuffer = new byte[Integer.SIZE / Byte.SIZE];
152152

153-
private final HttpSender sender;
153+
private final ThriftSender sender;
154154
private final Process process;
155155

156-
JaegerExporterHandler(final HttpSender sender, final Process process) {
156+
JaegerExporterHandler(final ThriftSender sender, final Process process) {
157157
this.sender = checkNotNull(sender, "Jaeger sender must NOT be null.");
158158
this.process = checkNotNull(process, "Process sending traces must NOT be null.");
159159
}

exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerTraceExporter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import com.google.common.annotations.VisibleForTesting;
2222
import io.jaegertracing.thrift.internal.senders.HttpSender;
23+
import io.jaegertracing.thrift.internal.senders.ThriftSender;
2324
import io.jaegertracing.thriftjava.Process;
2425
import io.opencensus.trace.Tracing;
2526
import io.opencensus.trace.export.SpanExporter;
@@ -72,15 +73,15 @@ public static void createAndRegister(final String thriftEndpoint, final String s
7273
* Creates and registers the Jaeger Trace exporter to the OpenCensus library using the provided
7374
* HttpSender. Only one Jaeger exporter can be registered at any point.
7475
*
75-
* @param httpSender the pre-configured HttpSender to use with the exporter
76+
* @param sender the pre-configured ThriftSender to use with the exporter
7677
* @param serviceName the local service name of the process.
7778
* @throws IllegalStateException if a Jaeger exporter is already registered.
7879
* @since 0.17
7980
*/
80-
public static void createWithSender(final HttpSender httpSender, final String serviceName) {
81+
public static void createWithSender(final ThriftSender sender, final String serviceName) {
8182
synchronized (monitor) {
8283
checkState(handler == null, "Jaeger exporter is already registered.");
83-
final SpanExporter.Handler newHandler = newHandlerWithSender(httpSender, serviceName);
84+
final SpanExporter.Handler newHandler = newHandlerWithSender(sender, serviceName);
8485
JaegerTraceExporter.handler = newHandler;
8586
register(Tracing.getExportComponent().getSpanExporter(), newHandler);
8687
}
@@ -94,7 +95,7 @@ private static SpanExporter.Handler newHandler(
9495
}
9596

9697
private static SpanExporter.Handler newHandlerWithSender(
97-
final HttpSender sender, final String serviceName) {
98+
final ThriftSender sender, final String serviceName) {
9899
final Process process = new Process(serviceName);
99100
return new JaegerExporterHandler(sender, process);
100101
}

0 commit comments

Comments
 (0)