openzipkin / brave-example Goto Github PK
View Code? Open in Web Editor NEWA collection of examples how to use brave instrumentation in various frameworks and libraries.
Home Page: https://gitter.im/openzipkin/zipkin
License: Apache License 2.0
A collection of examples how to use brave instrumentation in various frameworks and libraries.
Home Page: https://gitter.im/openzipkin/zipkin
License: Apache License 2.0
when i tried following the instructions in the introducation of webmvc4-boot, Backend and Frontend had different trace_id, by the way the webmvc4 works.
i did as follows:
The Result :
brave.webmvc.Frontend : [de8e059e2458c13a/de8e059e2458c13a]
brave.webmvc.Backend : [5762ebf5fd9fcb52/5762ebf5fd9fcb52]
is there anything wrong? Thanks.
We have questions by folks on various environments. Making a module for spring 3+ XML+servlet 2.5, spring 4 + servlet3, and finally spring boot should cover most of the bases.
I tried the example using Brave-zipkin[https://github.com/openzipkin/brave-webmvc-example/tree/master/webmvc3]. Everything looks fine for me.. except that, in the given example jetty server deploys the application twice, one for FrontEnd and another for Backend(using two profiles). Whereas I need to use tomcat-server without using any profiles.
Can anyone help me how to use this same tool for deploying in Tomcat-server and start the application without using profiles? kindly help
seems below config parentSpanId doesn't work:
%d{ABSOLUTE} [%X{traceId}/%X{spanId}/%X{parentSpanId}] %-5p [%t] %C{2} - %m%n
Add dependency and code to make use of Zipkin server vs logging spans into console. This logic is not enabled by default but it can be easily enabled. Could be very helpful to quickly ramp up with Zipkin.
hi, me again :)
I used brave-resteasy-example to build a trace demo, after run them, I try to understand the data struce, so i looking into database.
table_zipkin_spans.
span_id | parent_id | trace_id | span_name | debug | duration |
---|---|---|---|---|---|
-1015356763606953178 | -7464383308562486440 | -7464383308562486440 | /brave-resteasy-example/b | 0 | 888000 |
-1015356763606953178 | -7464383308562486440 | -7464383308562486440 | /RestEasyTest/brave-resteasy-example/b | 0 | 896000 |
-7464383308562486440 | -7464383308562486440 | /brave-resteasy-example/a | 0 | 956000 |
I have some questions blow.
1.I got three spans, one for a, and two for b, and there are two annotations (sr,ss)
) for a, and four annotation(cs,sr,ss,cr) for b. I guess you put the cs and cr annotation that occured by call a->b into span b.
2.why does the same spans b has two different span names (/brave-resteasy-example/b and /RestEasyTest/brave-resteasy-example/b)?
3.It seams like the dependencies tab not working. so I build my own test datas several times, and insert them into database, the only date that works fine lists below.
span_id | parent_id | trace_id | span_name | duration | annotations |
---|---|---|---|---|---|
1 | 10 | a | 10000 | sr,cr,cs,ss | |
2 | 1 | 10 | b | 9500 | sr,ss |
a.one name for one host.
b.one span for one host.(if not, e.g. host b have two spans with same span id(id=2), and this span id(id=2) associated with four annotations(sr,cr,cs,ss), in zipkin front UI these four annotations would be display twice for span b, that would be eight annotations)
c.host always have server part annotations(if don't have one, zipkin will make fake one), but client part annotations is not always needed.
If I generated two spans for one host, the only way avoid double annotations is like you did above, to give them different span name. but which name will be displayd in front is not so sure.
I have 3 projects, namely Project A which is the Data layer. Project B which acts as the rest client of Project A. Project C is a web application, having dependency as Project B. Built using Java and Spring mvc. Have configured all 3 projects as given in the example, and giving "zipkin:service" as "app". Built success on Maven and run on Tomcat using Eclipse. When seen from Zipkin UI, when a request is given from Project C, it shows traces coming from three different projects, and not as a single trace, going from Project C to Project A, thru Project B. What am I missing or should I be trying a different instrumentation for a project structure like this. Please help me.
This project can't be build on jdk8 when running mvn jetty:run -Pfrontend
:
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.8.0-202 is not in the allowed range [1.7,1.8).
my jdk version is:
➜ webmvc25 git:(master) ✗ java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b31)
Java HotSpot(TM) GraalVM EE 19.0.0 (build 25.212-b31-jvmci-19-b01, mixed mode)
A quick work around is changing the pom.xml:
<requireJavaVersion>
<version>1.7</version> // before is [1.7, 1.8)
</requireJavaVersion>
Hey, I have a project on spring 5.1.2.RELEASE, I did the same configuration as mentioned in WEBMVC3 but it isn't working. To double check I ran WEBMVC3 with zipkin server and it was working fine.
We get questions more frequently on normal spring and anecdotally I don't recall any questions about resteasy. It seems more bang for the buck to make this repository use vanilla spring web mvc servlet -> rest template.
If I get a couple people saying do it, I'll do it and rename it to brave-webmvc-example similar to https://github.com/openzipkin/sleuth-webmvc-example except not requiring spring boot (as some have mentioned they aren't running boot)
Spring Rest Template is not available until Spring3. While in the sample code brave-instrument-spring-web
is dependent on Spring Rest Template, more specifically is TracingClientHttpRequestIntercepter
depends on ClientHttpRequestInterceptor
Let's rename this repo to "brave-example" and allow other non-MVC examples inside.
This is an alternative to making a lot of repos based on example type (ex grpc vs spring). In other words, this should result in deleting https://github.com/openzipkin/brave-grpc-example or moving it to the attic
A macro-repo which covers different instrumentation will be similar to how the parent repo does. This can happen even if the MVC example is a primary choice for people getting started in Java.
Doing so would be similar to zipkin-js-example which includes two completely different examples inside (react-native and web).
It will also make docker slightly more coherent. The example image for brave would be "openzipkin/example-brave" with a tag describing which example it is.
Ex. openzipkin/example-brave:webmvc4-boot
image would correspond to the webmvc4-boot
directory here.
Module brave-zipkin-spancollector gives error in unit test while building via mvn clean install
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 13.384 sec <<< FAILURE!
testOfferTimeOut(com.github.kristofa.brave.zipkin.ITZipkinSpanCollector) Time elapsed: 0.006 sec <<< ERROR!
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:9410.
at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:89)
at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:68)
at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:61)
at com.github.kristofa.brave.zipkin.ZipkinCollectorServer.(ZipkinCollectorServer.java:32)
at com.github.kristofa.brave.zipkin.ITZipkinSpanCollector.testOfferTimeOut(ITZipkinSpanCollector.java:101)
Results :
Tests in error:
ITZipkinSpanCollector.testOfferTimeOut:101 ╗ TTransport Could not create Serve...
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
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.