https://github.com/byteshiva/zipkin-instrumentation-express
https://github.com/byteshiva/zipkin-instrumentation-express
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/byteshiva/zipkin-instrumentation-express
- Owner: byteshiva
- License: mit
- Created: 2016-09-29T11:04:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:22:35.000Z (over 2 years ago)
- Last Synced: 2025-01-22T12:12:48.387Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zipkin-instrumentation-express
An express middleware that adds Zipkin tracing to the application.
## Usage
```javascript
const express = require('express');
const {Tracer, ExplicitContext, ConsoleRecorder} = require('zipkin');
const zipkinMiddleware = require('zipkin-instrumentation-express').expressMiddleware;
const ctxImpl = new ExplicitContext();
const recorder = new ConsoleRecorder();
const tracer = new Tracer({ctxImpl, recorder}); // configure your tracer properly here
const app = express();
// Add the Zipkin middleware
app.use(zipkinMiddleware({
tracer,
serviceName: 'service-a' // name of this application
}));
```