-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |