Skip to content

Commit

Permalink
start of justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
deniseli committed Jul 10, 2024
1 parent a122f55 commit 876340b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,22 @@ debug *args:
FTL_DEBUG=true just build ftl
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec "{{RELEASE}}/ftl" -- dev {{args}} &
dlv_pid=$!
wait "$dlv_pid"
wait "$dlv_pid"

# Run otel collector in a docker container to stream local (i.e. from ftl dev) signals to
# the terminal tab where this is running. To stop the stream, run `just otel-stop` in a
# second terminal window.
otel-stream:
docker run \
-p 4317:4317 \
-p 55679:55679 \
otel/opentelemetry-collector:0.104.0

otelContainerID := `docker ps -f ancestor=otel/opentelemetry-collector:0.104.0 | tail -1 | cut -d " " -f1`
otel-stop:
docker stop "{{otelContainerID}}"

# Run `ftl dev` with the given args after setting the necessary envar
otel-dev *args:
export OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
ftl dev {{args}}

0 comments on commit 876340b

Please sign in to comment.