Skip to content

Releases: openzipkin/zipkin-js

Version 0.16.1

19 Feb 13:24
Compare
Choose a tag to compare

This patch version includes a couple of fixes:

Version 0.16.0

16 Jan 04:17
Compare
Choose a tag to compare
  • [#311] Makes browser support a first class citizen. Thanks to @ewhauser
  • [#318] Allows the traceId to be accessed from sequential promises in the route handler. Thanks to @ghermeto
  • [#320] Adds http.route as span name. Thanks to @ghermeto
  • Removes payload recording in batched commands. Thanks to @voldern
  • Fixes the installation of zipkin-instrumentation-grpc-client. Thanks to @li8
  • Upgraded the node-fetch version to 2.3.0 in zipkin-transport-http. Thanks to @Kiho

Version 0.15.0

10 Dec 06:33
Compare
Choose a tag to compare

This astonishing release comes with many new features and improvements.

  • Upgraded babel dependencies to babel 7 - thanks @DavideCarvalho
  • Improved Option type - thanks to @briancavalier
  • Dropped node 4 from CI (as it was never intended to be supported) - thanks to @DavideCarvalho
  • Added configurable logging module as argument - thanks to @ghermeto
  • Added superagent instrumentation - thanks to @ghermeto
  • Added timestamp parameter to recordAnnotation - thanks to @haoguanjun
  • Performance improvements for restify middleware - thanks to @ghermeto
  • Added support for maxPayloadSize option in HttpLogger - thanks to @juhovh
  • Added supportsJoin in HttpServer middleware - thanks to @juhovh
  • Added instrumentation for connect (works for both express and restify) - thanks to @ghermeto
  • Added GRPC client instrumentation - thanks to @ghermeto
  • Added support for restify 7+ - thanks to @ghermeto
  • Added support for default tags in tracer - thanks to @ghermeto

More so, many dramatic improvements to typescript code thanks to @DavideCarvalho and thanks to @sonybinhle for the code reviews.

Version 0.14.3

27 Oct 07:45
Compare
Choose a tag to compare

This release includes two fixes:

  1. [#248][#190][#268][#263] Fixes TS signatures and types to be consistent with the JS implementations. Thanks to @sonybinhle
  2. [#195] Fixes warnings with create-react-app. Thanks to @DavideCarvalho

Version 0.14.2

14 Sep 05:24
Compare
Choose a tag to compare

This new release include the brand new package zipkin-instrumentation-request-promise which adds tracing to the request and request-promise libraries. Thanks to @mkante for this effort.

It also improves the tests for client/server instrumentation by adding errors based on the status code.

Finally, thanks to @jnazander, there is a troubleshooting section for zipkin-instrumentation-cls.

Zipkin JS 0.14.1

10 Aug 06:00
Compare
Choose a tag to compare

#254 Fix TS compilation error for missing Option type argument - @kevin-greene-ck

Zipkin JS 0.14.0

20 Jul 09:51
Compare
Choose a tag to compare

Zipkin JS adds support for Sampling Flags and some other important improvements to the library:

  • #197 Sampling Flags allows a user to force a trace with a sampling decision. This could be useful for example when you want to debug all requests from an specific host or all traces for requests from an specific IP. In both cases, passing the X-B3-Flags: 1 or X-B3-Sampled: 1 will force downstream to respect those decisions.
  • #217 replaces http.url in favor of http.path in server tracing. This improvement trims the query string parameters coming from upstream to avoid the collection of sensitive information like api keys or e-mails in the query string. Thanks to @pchiwan.
  • #246 fixes the signature of the ConsoleRecorder constructor as it does not match ts type. Thanks to @tomasAlabes.
  • #210 records an error if there was one in the express middleware for more meaningful traces. Thanks to @chris-smith-zocdoc
  • #236 allow httpServer instrumentation host to be overridden as httpServer instrumentation implementation was querying the OS to find the host's ip address on every request. This can lead to a performance problem when the server is under heavy load. Thanks to @rcoedo
  • #243 ensures tag and annotation values are casted to strings according to the Zipkin v2 JSON swagger spec. Thanks to @keitwb

zipkin-js v0.11

22 Nov 14:21
Compare
Choose a tag to compare

zipkin-js v0.11 adds PostgreSQL, TypeScript, http customization and local tracing apis.

We're quite lucky to have a community producing works like this. Don't forget to watch our repo for change you're interested in!

PostgreSQL

Those familiar with Zipkin change culture know that we aim for high quality implementations that are desired by multiple parties (rule-of-three). Thanks to @voldern, we now have client instrumentation for postgreql and thanks to our community speaking up in favor, it is merged!

Here's a snippet from the README:

const client = new ZipkinPostgres.Client(connectionOptions);
const pool = new ZipkinPostgres.Pool(connectionOptions);

// Your application code here
client.query('SELECT NOW()', (err, result) => {
  console.log(err, result);
});

pool.query('SELECT NOW()')
  .then(console.log)
  .catch(console.error);

TypeScript

TypeScript is quickly catching fire in our repository. Many thanks to @yonran and @pbadenski for fleshing out declaration files, covering our base api, all transports and a couple instrumentation packages. Keep an eye out or roll up your sleeves to help complete the job!

Http transport customizations

Some folks proxy zipkin, adding aspects such as oauth they might need. Thanks to @voldern, you can now customize headers used to transport spans, such as adding authorization.

const recorder = new BatchRecorder({
  logger: new HttpLogger({
    endpoint: 'http://your_host:9411/api/v2/spans',
    jsonEncoder: JSON_V2,
    headers: {'Authorization': 'secret'} // optional custom HTTP headers
  })
});

Local tracing

Local tracing is capturing activity that starts before remote service calls, or in-between them. This can be used to label code in a client, such as react-native, or a notable operation you need to pay attention to for SLA reasons. Thanks to a lot of help from @eirslett @DanielMSchmidt and @sundarsy, we now have a new api command Tracer.local which wraps synchronous or promise results.

Here's an example tracing a synchronous function:

// A span representing checkout completes before result is returned
const result = tracer.local('checkout', () => {
  return someComputation();
});

Here's an example tracing a function that returns a promise:

// A span is in progress and completes when the promise is resolved.
const result = tracer.local('checkout', () => {
  return createAPromise();
});

Look at our README or our example node or React Native projects for local tracing in action!

zipkin-js v0.10

29 Oct 03:24
Compare
Choose a tag to compare

zipkin-js v0.10 adds support for React Native and Web, dramatically simplifies development of new instrumentation and allows sending in json v2 format.

React Native

The zipkin-js community have worked hard to ensure tracing can work in as many environments as possible. For example, the project started with just node environments, but was later polished to also work in the browser. React Native allows you to build mobile apps using only javascript. Until version 0.10, we couldn't work in React Native due to some dependency issues.

Thanks to a lot of work by @DanielMSchmidt and advice by @eirslett, zipkin-js now works in React Native, and we even have an example you can use to try it yourself.

Easier instrumentation

@pbadenski noticed repetition in coding and testing instrumentation. This led to problems where for example a bug fixed in http library X wasn't automatically solved in library Y. There's now an Instrumentation type and supporting generic tests which boil down the tasks of adding a new framework to basically knowing what callbacks do, and how to parse and http request. You can see an example here in our express middleware. As a result, coding and test coverage are both easier to achieve. Bravo, @pbadenski!

Zipkin v2 json format

On the way of fixing some dependencies, we now have a type model.Span which directly maps to the simpler Zipkin v2 schema. Simplifications include simple dict instead of "binary annotations" and no more repeating endpoints. To use this format, assign the v2 encoder like so:

const {
  BatchRecorder,
  jsonEncoder: {JSON_V2}
} = require('zipkin');
const {HttpLogger} = require('zipkin-transport-http');

// Send spans to Zipkin asynchronously over HTTP
const zipkinBaseUrl = 'http://localhost:9411';
const recorder = new BatchRecorder({
  logger: new HttpLogger({
    endpoint: `${zipkinBaseUrl}/api/v2/spans`,
    jsonEncoder: JSON_V2
  })
});