jaegertracing / jaeger-client-java Goto Github PK
View Code? Open in Web Editor NEW๐ This library is DEPRECATED!
Home Page: https://jaegertracing.io/
License: Other
๐ This library is DEPRECATED!
Home Page: https://jaegertracing.io/
License: Other
As B3 context propagation is not Zipkin specific, it would be nice if B3TextMapCodec was included in jaeger-core.
In the following code for TimerTask, ArrayBlockingQueue could throw exceptions such as IllegalStateException and so on but the code is not catching and logging these errors properly. Code should catch and log proper exceptions via slf4j logger and may be capture this error in some metrics.
Exception in thread "Timer-3" java.lang.IllegalStateException: Queue full
at java.util.AbstractQueue.add(AbstractQueue.java:98)
at java.util.concurrent.ArrayBlockingQueue.add(ArrayBlockingQueue.java:312)
at com.uber.jaeger.reporters.RemoteReporter$1.run(RemoteReporter.java:73)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
The current dropwizard instrumentation simply uses the http method as the span's operation name. Having this be the value of the @Path
annotation could be significantly more useful
jaeger.thrift is our strategic data model that supports all OpenTracing features including kv-logs and span references. Node.js client is already using it as the default model. The goal is to upgrade all remaining clients to it.
Currently, there are disabled some javadoc related rules e.g. https://github.com/uber/jaeger-client-java/blob/master/config/checkstyle/checkstyle.xml#L187.
We have users who use Apache AsyncHttpClient instead of Dropwizard. We should have a module in jaeger to add tracing to that client.
For example jaeger-core-0.8.0.jar
contains the class com.uber.jaeger.SpanTest
which seems a bit weird to me. Is this intended? I'd expect the test classes to be published in jaeger-core-0.8.0-tests.jar
if they need to be published at all. See also https://discuss.gradle.org/t/how-to-reference-a-test-jar-from-a-project-in-a-multi-project-build/5715.
It is useful
In other clients (e.g. Go) we allow using jaeger-baggage: k1=v1,k2=v2
header for this purpose, as well as the normal uberctx-
-prefixed headers.
When a request is made with a debug header, set a debug-origin
header that contains the name of the service that flipped the debug flag.
In all of the http filters, log when a request is received with jaeger-debug-header set
The java jaeger client logs nothing during setup and startup/shutdown, making debugging difficult. Adding logs would ease this.
@adriancole did this in Zipkin by implementing thrift-like serialization manually. However, if we do this, I'd only do it along with upgrading to the new data model.
Use okhttp interceptors to add tracing support
In zipkin's thrift, Endpoint.serviceName is not an optional field. Conventionally, some set this to empty, but not serializing it is a mistake. I noticed this when using the jersey client, which might hint there's a bug there (as I did specify a serviceName).
This should be enforced in unit tests or similar as otherwise the only way to know is after it reaches zipkin.
It looks like the import order that we have doesn't really follow our style guide (google java style), nor is it enforced during the build.
This results in a lot of import statements moved around in diffs making reviewing them difficult.
Hi,
it would be nice if Jaeger was Java 6 compatible as I want to use it for stagemonitor, which currently is Java 6 compatible. Are there any reasons you don't want to support Java 6?
Cheers,
Felix
Applying this annotation on a resource method would cause that method to not be traced
Most applications don't have a formal way of correlating log lines for a given request even within the application.
For these applications, it would be very beneficial to set the traceId in a MDC which allows end users to simply add the traceId's MDC parameter to their log format string, enabling them to separate log lines on a per request basis.
For e.g., this coveralls report claims only 3 files are present and the coverage remained the same, while the PR changed 12 files, and added tests where none were present earlier.
When we import the project into IDE (e.g. IntelliJ, Eclipse, NetBeans), some IDE specific files are generated, which we need to ignore.
The same applies to Operating system specific files. E.g. on mac *.DS_Store, . LSOverride, etc.
We can extend our .gitignore file to cover some more defaults?
The current configuration for the license header plugin updates the license header on build and doesn't seem to test the presence of a header when code without a header is checked in.
Read the documentation here https://github.com/hierynomus/license-gradle-plugin and configure the plugin to fail the build if a license header isn't applied. Do not apply the license header as part of the build. (Doing so unnecessarily applies the header to all the thrift generated files which is potentially slowing down the build).
Add a checklist of things that need to be done to instrument an rpc library.
Current release process is documented in the readme and is fairly painful. The most ideal process would be to push a tag and have the release happen automatically (but I am not clear what happens to the changelog in this case). Using a make command would also be acceptable if it can do a bunch of changes in a row like bump the version, publish, bump version to snapshot again, and then automatically close & release the repo from staging to maven via sonatype.
Especially:
/jaeger-jaxrs2/src/main/java/com/uber/jaeger/filters/jaxrs2/TracingUtils.java
/jaeger-jaxrs2/src/main/java/com/uber/jaeger/filters/jaxrs2/Constants.java
/jaeger-jaxrs2/src/main/java/com/uber/jaeger/filters/jaxrs2/TracingUtils.java
/jaeger-jaxrs2/src/main/java/com/uber/jaeger/filters/jaxrs2/ServerFilter.java
The java client samples at a fixed rate. Respect a per operation sampling strategy when the agent allows for it. Fall back to probabilistic sampling if there is no per operation sampling.
When building I get the following warnings:
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:62: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Long(1), TagType.LONG, new Long(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ (long) 1, TagType.LONG, new Long(1) },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:62: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Long(1), TagType.LONG, new Long(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ new Long(1), TagType.LONG, (long) 1 },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:63: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Integer(1), TagType.LONG, new Long(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ 1, TagType.LONG, new Long(1) },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:63: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Integer(1), TagType.LONG, new Long(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ new Integer(1), TagType.LONG, (long) 1 },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:64: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Short((short) 1), TagType.LONG, new Long(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ (short) 1, TagType.LONG, new Long(1) },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:64: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Short((short) 1), TagType.LONG, new Long(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ new Short((short) 1), TagType.LONG, (long) 1 },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:65: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Double(1), TagType.DOUBLE, new Double(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ (double) 1, TagType.DOUBLE, new Double(1) },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:65: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Double(1), TagType.DOUBLE, new Double(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ new Double(1), TagType.DOUBLE, (double) 1 },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:66: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Float(1), TagType.DOUBLE, new Double(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ (float) 1, TagType.DOUBLE, new Double(1) },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:66: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Float(1), TagType.DOUBLE, new Double(1) },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ new Float(1), TagType.DOUBLE, (double) 1 },'?
/home/kearls/tmp/jaeger-client-java/jaeger-core/src/test/java/com/uber/jaeger/reporters/protocols/JaegerThriftSpanConverterTest.java:67: warning: [BoxedPrimitiveConstructor] valueOf or autoboxing provides better time and space performance
{ new Byte((byte) 1), TagType.STRING, "1" },
^
(see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor)
Did you mean '{ (byte) 1, TagType.STRING, "1" },'?
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
11 warnings
I'm having to do a lot of hacking to make it possible to use an alternate Reporter (or at least an alternate Sender) with the current com.uber.jaeger.Configuration.
Snapshot should be only published from master
Projects using jaeger might be using arbitrary versions of thrift. This sometimes leads to silent failures when the UDPSender attempts to report spans.
A shaded jar would be useful for those people who aren't able to control the version of thrift their project uses.
Crossdock should stop and remove containers after it's done with testing.
May need to request access to com.uber
similar to https://issues.sonatype.org/browse/OSSRH-23572
When I execute:
./gradlew clean test
I receive
Jar was not signed since this was a snapshot release.
Jar was not signed since this was a snapshot release.
Jar was not signed since this was a snapshot release.
:jaeger-context:clean
:jaeger-core:clean
:jaeger-jaxrs2:clean UP-TO-DATE
:jaeger-context:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
:jaeger-context:licenseFormatMain UP-TO-DATE
:jaeger-context:licenseFormatTest UP-TO-DATE
:jaeger-context:licenseFormat UP-TO-DATE
:jaeger-context:processResources UP-TO-DATE
:jaeger-context:classes
:jaeger-context:compileTestJava UP-TO-DATE
:jaeger-context:processTestResources UP-TO-DATE
:jaeger-context:testClasses UP-TO-DATE
:jaeger-context:test UP-TO-DATE
:jaeger-core:compileThrift UP-TO-DATE
:jaeger-core:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/Span.java:29: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.Endpoint;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/Span.java:39: error: cannot find symbol
private Endpoint peer;
^
symbol: class Endpoint
location: class Span
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/Span.java:65: error: cannot find symbol
public Endpoint getPeer() {
^
symbol: class Endpoint
location: class Span
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:24: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.Annotation;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:25: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.AnnotationType;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:26: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.BinaryAnnotation;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:27: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.Endpoint;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:28: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.zipkincoreConstants;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:43: error: package com.twitter.zipkin.thriftjava does not exist
public static com.twitter.zipkin.thriftjava.Span convertSpan(Span span) {
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:63: error: cannot find symbol
private static List<Annotation> buildAnnotations(Span span, Endpoint host) {
^
symbol: class Endpoint
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:63: error: cannot find symbol
private static List<Annotation> buildAnnotations(Span span, Endpoint host) {
^
symbol: class Annotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:89: error: cannot find symbol
private static List<BinaryAnnotation> buildBinaryAnnotations(Span span, Endpoint host) {
^
symbol: class Endpoint
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:89: error: cannot find symbol
private static List<BinaryAnnotation> buildBinaryAnnotations(Span span, Endpoint host) {
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:129: error: cannot find symbol
private static BinaryAnnotation buildBinaryAnnotation(String tagKey, Object tagValue) {
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/Sender.java:24: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.Span;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/Sender.java:28: error: cannot find symbol
int append(Span span) throws SenderException;
^
symbol: class Span
location: interface Sender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/RemoteReporter.java:113: error: package com.twitter.zipkin.thriftjava does not exist
private final com.twitter.zipkin.thriftjava.Span span;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/RemoteReporter.java:115: error: package com.twitter.zipkin.thriftjava does not exist
public AppendCommand(com.twitter.zipkin.thriftjava.Span span) {
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:26: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.ProbabilisticSamplingStrategy;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:27: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.RateLimitingSamplingStrategy;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:28: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.SamplingStrategyResponse;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:29: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.SamplingStrategyType;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/SamplingManager.java:25: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.SamplingStrategyResponse;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:67: error: cannot find symbol
private SamplingStrategyResponse jsonStringToSamplingStrategy(String jsonString) {
^
symbol: class SamplingStrategyResponse
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:104: error: cannot find symbol
public SamplingStrategyResponse getSamplingStrategy(String serviceName) throws SamplingStrategyErrorException {
^
symbol: class SamplingStrategyResponse
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/SamplingManager.java:28: error: cannot find symbol
SamplingStrategyResponse getSamplingStrategy(String serviceName) throws SamplingStrategyErrorException;
^
symbol: class SamplingStrategyResponse
location: interface SamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/RemoteControlledSampler.java:27: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.ProbabilisticSamplingStrategy;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/RemoteControlledSampler.java:28: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.RateLimitingSamplingStrategy;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/RemoteControlledSampler.java:29: error: package com.uber.jaeger.thrift.sampling_manager does not exist
import com.uber.jaeger.thrift.sampling_manager.SamplingStrategyResponse;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/RemoteControlledSampler.java:97: error: cannot find symbol
private Sampler extractSampler(SamplingStrategyResponse response) throws UnknownSamplingStrategyException {
^
symbol: class SamplingStrategyResponse
location: class RemoteControlledSampler
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:24: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.Span;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:31: error: cannot find symbol
private List<Span> appended;
^
symbol: class Span
location: class InMemorySender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:32: error: cannot find symbol
private List<Span> flushed;
^
symbol: class Span
location: class InMemorySender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:33: error: cannot find symbol
private List<Span> received;
^
symbol: class Span
location: class InMemorySender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:41: error: cannot find symbol
public List<Span> getAppended() {
^
symbol: class Span
location: class InMemorySender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:45: error: cannot find symbol
public List<Span> getFlushed() {
^
symbol: class Span
location: class InMemorySender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:49: error: cannot find symbol
public List<Span> getReceived() {
^
symbol: class Span
location: class InMemorySender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/InMemorySender.java:54: error: cannot find symbol
public int append(Span span) throws SenderException {
^
symbol: class Span
location: class InMemorySender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/UDPSender.java:27: error: package com.twitter.zipkin.thriftjava does not exist
import com.twitter.zipkin.thriftjava.Span;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/UDPSender.java:28: error: package com.uber.jaeger.agent.thrift does not exist
import com.uber.jaeger.agent.thrift.Agent;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/UDPSender.java:42: error: package Agent does not exist
private Agent.Client udpClient;
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/UDPSender.java:43: error: cannot find symbol
private List<Span> spanBuffer;
^
symbol: class Span
location: class UDPSender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/UDPSender.java:70: error: cannot find symbol
int getSizeOfSerializedSpan(Span span) throws SenderException {
^
symbol: class Span
location: class UDPSender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/UDPSender.java:86: error: cannot find symbol
public int append(Span span) throws SenderException {
^
symbol: class Span
location: class UDPSender
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/Span.java:68: error: cannot find symbol
peer = new Endpoint();
^
symbol: class Endpoint
location: class Span
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:45: error: cannot find symbol
Endpoint host = new Endpoint(
^
symbol: class Endpoint
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:45: error: cannot find symbol
Endpoint host = new Endpoint(
^
symbol: class Endpoint
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:51: error: package com.twitter.zipkin.thriftjava does not exist
return new com.twitter.zipkin.thriftjava.Span(
^
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:64: error: cannot find symbol
List<Annotation> annotations = new ArrayList<>();
^
symbol: class Annotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:67: error: cannot find symbol
String startLabel = zipkincoreConstants.SERVER_RECV;
^
symbol: variable zipkincoreConstants
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:68: error: cannot find symbol
String endLabel = zipkincoreConstants.SERVER_SEND;
^
symbol: variable zipkincoreConstants
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:70: error: cannot find symbol
startLabel = zipkincoreConstants.CLIENT_SEND;
^
symbol: variable zipkincoreConstants
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:71: error: cannot find symbol
endLabel = zipkincoreConstants.CLIENT_RECV;
^
symbol: variable zipkincoreConstants
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:74: error: cannot find symbol
annotations.add(new Annotation(span.getStart(), startLabel).setHost(host));
^
symbol: class Annotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:75: error: cannot find symbol
annotations.add(new Annotation(span.getStart() + span.getDuration(), endLabel).setHost(host));
^
symbol: class Annotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:81: error: cannot find symbol
annotations.add(new Annotation(logData.getTime(), logData.getMessage()));
^
symbol: class Annotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:90: error: cannot find symbol
List<BinaryAnnotation> binaryAnnotations = new ArrayList<BinaryAnnotation>();
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:90: error: cannot find symbol
List<BinaryAnnotation> binaryAnnotations = new ArrayList<BinaryAnnotation>();
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:93: error: cannot find symbol
String label = span.isRPCClient() ? zipkincoreConstants.SERVER_ADDR : zipkincoreConstants.CLIENT_ADDR;
^
symbol: variable zipkincoreConstants
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:93: error: cannot find symbol
String label = span.isRPCClient() ? zipkincoreConstants.SERVER_ADDR : zipkincoreConstants.CLIENT_ADDR;
^
symbol: variable zipkincoreConstants
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:98: error: cannot find symbol
.setAnnotation_type(AnnotationType.BOOL)
^
symbol: variable AnnotationType
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:95: error: cannot find symbol
binaryAnnotations.add(new BinaryAnnotation()
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:113: error: cannot find symbol
.setAnnotation_type(AnnotationType.STRING)
^
symbol: variable AnnotationType
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:111: error: cannot find symbol
binaryAnnotations.add(new BinaryAnnotation().setKey(zipkincoreConstants.LOCAL_COMPONENT)
^
symbol: variable zipkincoreConstants
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:111: error: cannot find symbol
binaryAnnotations.add(new BinaryAnnotation().setKey(zipkincoreConstants.LOCAL_COMPONENT)
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:130: error: cannot find symbol
BinaryAnnotation banno = new BinaryAnnotation()
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:130: error: cannot find symbol
BinaryAnnotation banno = new BinaryAnnotation()
^
symbol: class BinaryAnnotation
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/reporters/protocols/ThriftSpanConverter.java:138: error: cannot find symbol
banno.setValue(stringTagValue.getBytes()).setAnnotation_type(AnnotationType.STRING);
^
symbol: variable AnnotationType
location: class ThriftSpanConverter
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:75: error: cannot find symbol
SamplingStrategyType samplingType = SamplingStrategyType.findByValue((Integer) result.get("strategyType"));
^
symbol: class SamplingStrategyType
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:75: error: cannot find symbol
SamplingStrategyType samplingType = SamplingStrategyType.findByValue((Integer) result.get("strategyType"));
^
symbol: variable SamplingStrategyType
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:76: error: cannot find symbol
if (samplingType == SamplingStrategyType.PROBABILISTIC) {
^
symbol: variable SamplingStrategyType
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:85: error: cannot find symbol
.setProbabilisticSampling(new ProbabilisticSamplingStrategy(samplingRate));
^
symbol: class ProbabilisticSamplingStrategy
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:84: error: cannot find symbol
return new SamplingStrategyResponse(samplingType)
^
symbol: class SamplingStrategyResponse
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:88: error: cannot find symbol
if (samplingType == SamplingStrategyType.RATE_LIMITING) {
^
symbol: variable SamplingStrategyType
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:97: error: cannot find symbol
.setRateLimitingSampling(new RateLimitingSamplingStrategy((short)maxTracesPerSecond));
^
symbol: class RateLimitingSamplingStrategy
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java:96: error: cannot find symbol
return new SamplingStrategyResponse(samplingType)
^
symbol: class SamplingStrategyResponse
location: class HTTPSamplingManager
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/RemoteControlledSampler.java:70: error: cannot find symbol
SamplingStrategyResponse response;
^
symbol: class SamplingStrategyResponse
location: class RemoteControlledSampler
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/RemoteControlledSampler.java:99: error: cannot find symbol
ProbabilisticSamplingStrategy strategy = response.getProbabilisticSampling();
^
symbol: class ProbabilisticSamplingStrategy
location: class RemoteControlledSampler
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/RemoteControlledSampler.java:104: error: cannot find symbol
RateLimitingSamplingStrategy strategy = response.getRateLimitingSampling();
^
symbol: class RateLimitingSamplingStrategy
location: class RemoteControlledSampler
/Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/senders/UDPSender.java:64: error: package Agent does not exist
udpClient = new Agent.Client(new TCompactProtocol(udpTransport));
^
Note: /Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/nklmish/workspace/jaeger-client-java/jaeger-core/src/main/java/com/uber/jaeger/samplers/HTTPSamplingManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
80 errors
1 warning
:jaeger-core:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jaeger-core:compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
We can improve the performance of equals
method by first comparing whether two instances of the object belongs to the same reference.
E.g. In class RemoteControllerSampler
, the equals
method looks like this:
@Override
public boolean equals(Object sampler) {
if (sampler instanceof RemoteControlledSampler) {
RemoteControlledSampler remoteSampler = ((RemoteControlledSampler) sampler);
synchronized (this) {
ReentrantReadWriteLock.ReadLock readLock = remoteSampler.getLock().readLock();
readLock.lock();
try {
return this.sampler.equals(remoteSampler.sampler);
} finally {
readLock.unlock();
}
}
}
return false;
}
Now consider a scenario :
RemoteControllerSampler original = new RemoteControllerSampler(...);
RemoteControllerSampler copy = original;
IntStream.range(0, 100).parallel().forEach(
loopCounter -> System.out.println(original.equals(copy))
);
We need to acquire and release lock and execute the equals logic N (100) times.
But if we perform the following check in the beginning of equals
method:
if (this == sampler) return true
then the code will have no need to acquire any lock if both instances refer to the same reference.
To summarise, the improved equals
method will look like this:
@Override
public boolean equals(Object sampler) {
if (this == sampler) return true;
....
}
Then upgrade internal repo to depend on public artifact from maven
I'm not sure which side did this, but something in the jersey trace filter is printing a toString, not a url.
https://github.com/openzipkin/jaeger-jersey-example
{
"key": "http.url",
"value": "org.glassfish.jersey.server.internal.routing.UriRoutingContext@20bca98f"
},
{
"key": "http.url",
"value": "http://localhost:9000/api"
},
JaegerFeature implements javax.ws.rs.core.Feature
and does not require any dropwizard specific classes.
The build job currently takes ~5 mins. Investigate whether splitting it up as described in https://docs.travis-ci.com/user/speeding-up-the-build/ could make this faster.
Is there a way to replace SPAN_CONTEXT_KEY to something like "x-trace-id" or "jaeger-trace-id" instead of ""uber-trace-id"?
The following TextMapCodec doesn't seem to be pluggable.
public class TextMapCodec implements Injector, Extractor {
/** Key used to store serialized span context representation */
private static final String SPAN_CONTEXT_KEY = "uber-trace-id";
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.