1.0.1 • Published 6 months ago

@effect-aws/powertools-tracer v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@effect-aws/powertools-tracer

AWS X-Ray Powertools SDK for Effect.

npm version npm downloads

This experimental library allows you to trace your Effect programs and send them to AWS X-Ray leveraging the Powertools SDK.

Installation

npm install --save @effect-aws/powertools-tracer @aws-lambda-powertools/tracer

Note: @aws-lambda-powertools/tracer is a peer dependency.

Usage

import { Tracer } from "@effect-aws/powertools-tracer"

const program = Effect.gen(function* () {
  yield* Effect.log("Hello")
  yield* Effect.annotateCurrentSpan({ message: "Metadata" })
}).pipe(Effect.withSpan("MyTrace"))

program.pipe(Effect.provide(Tracer.layer()), Effect.runSync)

Check out the a more complete example in the examples.

1.0.1

6 months ago

1.0.0

6 months ago