Giter Site home page Giter Site logo

Comments (10)

jquatier avatar jquatier commented on August 16, 2024 1

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.

eirslett avatar eirslett commented on August 16, 2024

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.

hakanson avatar hakanson commented on August 16, 2024

Would a JSON codec also help browser support (a la issue #1)?

from zipkin-js.

eirslett avatar eirslett commented on August 16, 2024

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.

hakanson avatar hakanson commented on August 16, 2024

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.

codefromthecrypt avatar codefromthecrypt commented on August 16, 2024

from zipkin-js.

sveisvei avatar sveisvei commented on August 16, 2024

I would also prefer JSON over http.

from zipkin-js.

hakanson avatar hakanson commented on August 16, 2024

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.

eirslett avatar eirslett commented on August 16, 2024

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.

eirslett avatar eirslett commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.