Comments (10)
I actually could use this too, and I'm going to start working on it (unless anyone already has). I have a Spring app that uses the ZipkinHttpCollector and need to POST the correct JSON to it.
I was planning on making a new zipkin-transport-http
package that handles translating the spans to the proper JSON format and then sending the spans using fetch
or request
to a configurable endpoint. If that sounds good, I also am wondering if I should keep the JSON object translation code in that package or put toJSON()
methods in the internalRepresentations
module (similar to the toThrift()
methods). @eirslett Any thoughts?
Let me know, I'm open to suggestions and I'd like to contribute this back to zipkin-js as a PR when I'm done. Thanks all!
from zipkin-js.
It would be practical, but not strictly needed. This is the way things are connected:
Your application -> Zipkin server -> Backend (e.g. ElasticSearch for Cassandra)
You can also add a queue between, e.g. Your application -> Scribe -> Zipkin server, or Your application -> Kafka -> Zipkin server. If you use the scribe transport, you don't need a queue, you can send span data directly to the Zipkin server on port 9410.
Both the Kafka transport and the Scribe transport depend on Thrift, which is a pretty heavy library; a JSON codec could potentially give us an almost dependency-free transport.
from zipkin-js.
Would a JSON codec also help browser support (a la issue #1)?
from zipkin-js.
It would help for debugging, at least - to have a human-readable message format. (But as I mentioned, it's not a requirement for browser support)
If you want to add it, feel free to send a PR and we'll have a look! :-)
from zipkin-js.
Is JSON codec documented anywhere other that reading the java source code? I was looking for either a spec or an example last week and not having any luck.
from zipkin-js.
from zipkin-js.
I would also prefer JSON over http.
from zipkin-js.
It looks like TraceId and Annotation have implemented toString
methods that are used by the ConsoleRecorder. Should the JSON codec be an external class or a set of toJSON
methods on the objects proper?
Also, after the hint, I found the .yaml behind that Swagge link: https://github.com/openzipkin/zipkin-api/blob/master/zipkin-api.yaml
from zipkin-js.
Look at serializeSpan, which currently supports base64 and binary. Also have a look at internalRepresentations. That span is the object that must be serialized.
from zipkin-js.
Great initiative! Put the serialization in the same place thrift serialization takes place. (Maybe even add unit tests where it makes sense) We look forward to a PR, thanks a lot!
from zipkin-js.
Related Issues (20)
- Trace ID not Maintained over Multiple Service Hops with Express/Fetch HOT 2
- Allow adding arbitrary tags on span HOT 1
- gotjs intrumentation is not working HOT 3
- Makes HttpLogger flushable and/or sync optionally HOT 2
- node-fetch is listed as devDependency but it is required as the default fetch HOT 1
- Instrumentations multiple instances HOT 1
- isOptional and Related checks are wrong and breaks compatibility between versions HOT 5
- ES6 import doesn't work with 'zipkin-context-cls' HOT 1
- Migrate to Github Actions
- Switch CI to GitHub actions HOT 3
- Does zipkin support grpc server in javascript now?
- How to pass custom header in zipkin with multi-service request
- zipkin-instrumentation-axiosjs not preserving traceId HOT 1
- Integration with NextJs
- Separate Trace is getting created in case of wrapping Axios Client HOT 1
- zipkin-cls-context test can't passed
- zipkin-js doesn't work with last versions of create-react-app (react-scripts) 5 or webpack 5
- Missing parent link
- Help with "exclude urls" in HttpLogger of zipkin-transport-http
- please help with maintenance or archive this HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zipkin-js.