Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zipkin-instrumentation-fetch

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zipkin-instrumentation-fetch

Interceptor for HTTP clients using the 'fetch' API

  • 0.19.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.9K
decreased by-40.24%
Maintainers
1
Weekly downloads
 
Created
Source

zipkin-instrumentation-fetch

npm

This library will wrap the fetch API. You need to provide your own fetch implementation; it could for example come from window.fetch (in the browser), or node-fetch on Node.js.

Usage

const {Tracer} = require('zipkin');
const wrapFetch = require('zipkin-instrumentation-fetch');

const localServiceName = 'service-a'; // name of this application
const tracer = new Tracer({ctxImpl, recorder, localServiceName});

const remoteServiceName = 'youtube';
const zipkinFetch = wrapFetch(fetch, {tracer, remoteServiceName});

// Your application code here
zipkinFetch('http://www.youtube.com/').then(res => res.json()).then(data => ...);

FAQs

Package last updated on 06 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc