Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Feb 15, 2024
1 parent 0a2e9a0 commit 4a5bfce
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# Effect Dev Tools

WIP
View traces, metrics and inspect the context for your Effect app - all without leaving VSCode!

## Setup

To use Effect Dev Tools in your Effect project, first you need to install the following dependency:

```
pnpm install @effect/experimental
```

You can then import and use the `DevTools` module in your Effect app:

```ts
import { DevTools } from "@effect/experimental"
import { Effect, Layer } from "effect"

const program = Effect.sleep("1 seconds").pipe(Effect.withSpan("hello world"))

program.pipe(Effect.provide(DevTools.layer()), Effect.runFork)
```

If you are using `@effect/opentelemetry` in your project, then it is important that you provide the `DevTools` layer **after** your tracing layers, so the tracer is patched correctly.

## Usage

Once you have added the Layer to your project, open the Effect Dev Tools panel in vscode & click "Start the server" in the "Clients" panel.

You can then start your Effect app, and then begin to inspect the results!

0 comments on commit 4a5bfce

Please sign in to comment.