@meetup/memberpay-xray
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

memberpay-xray

memberpay-xray is a library that provides a wrapper around aws-xray-sdk-core extending it with additional methods. The goal is to use memberpay-xray in place of the original aws-xray-sdk-core.

Install

npm install @meetup/memberpay-xray

Use

import { fetch, Response } from 'node-fetch';
import XRay from '@meetup/memberpay-xray';

// Does everything(*) that 'aws-xray-sdk-core' can
const tracedHttps = XRay.captureHTTPs(require('https'));
tracedHttps.get('https://www.meetup.com');

// ...and something that 'aws-xray-sdk-core' can't
const tracedFetch = XRay.captureAsync(
  'Fetch www.meetup.com', 
  (): Promise<Response> => fetch('www.meetup.com')
);
await tracedFetch();

* memberpay-xray provides all main tracing methods of aws-xray-sdk-core. If you didn't find the method you need (but it exists in aws-xray-sdk-core), feel free to extend aws-xray-sdk-core type definitions.

Enjoy!

Made with ❤️ by Member Payments team

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.7
    0
    • latest

Version History

Package Sidebar

Install

npm i @meetup/memberpay-xray

Weekly Downloads

0

Version

1.0.7

License

MIT

Unpacked Size

39.5 kB

Total Files

23

Last publish

Collaborators

  • meetupbot