JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 50
  • Score
    100M100P100Q82849F
  • License MIT

Allows adding a subsegment to XRay around any promise

Package Exports

  • aws-xray-lambda-promise-subsegment

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aws-xray-lambda-promise-subsegment) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

aws-xray-lambda-promise-subsegment

Allows a new subsegment to be added to XRay around any promise

Usage

// javascript
const addPromiseSegment = require("aws-xray-lambda-promise-subsegment").addPromiseSegment;

const promiseOfThings = promiseOfThingsFactory();

addPromiseSegment("subSegmentName", promiseOfThings, {
      someMetadata1: greatValue,
      someMetadata2: amazingValue
  },
  {
      annotation1: bestValue,
      annotation2: biglyValue
  });
// typescript
import { addPromiseSegment } from "aws-xray-lambda-promise-subsegment";

const promiseOfThings = promiseOfThingsFactory();

addPromiseSegment("subSegmentName", promiseOfThings, {
      someMetadata1: greatValue,
      someMetadata2: amazingValue
  },
  {
      annotation1: bestValue,
      annotation2: biglyValue
  });