Skip to content

Instantly share code, notes, and snippets.

@DanielMSchmidt
Created December 7, 2017 20:53
Show Gist options
  • Save DanielMSchmidt/4c95fb1df034700a2927525dc296d9ed to your computer and use it in GitHub Desktop.
Save DanielMSchmidt/4c95fb1df034700a2927525dc296d9ed to your computer and use it in GitHub Desktop.
import zipkin from "zipkin";
import { HttpLogger } from "zipkin-transport-http";
const tracer = new zipkin.Tracer({
ctxImpl: new zipkin.ExplicitContext(),
recorder: new zipkin.BatchRecorder({
logger: new HttpLogger({
endpoint: 'http://localhost:9411/api/v2/spans',
jsonEncoder: zipkin.jsonEncoder.JSON_V2,
fetch
})
}),
sampler: new zipkin.sampler.CountingSampler(1),
localServiceName: "frontend"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment