Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
feacbd7
docs: clean up observability
mendonk Aug 18, 2026
45dc1ea
docs: link env vars entry out to otel page
mendonk Aug 19, 2026
9c49953
docs: plain OTLP
mendonk Aug 19, 2026
d6efc52
docs: bundle installation and langflow-core changes
mendonk Aug 21, 2026
7e91090
docs: admin page changes
mendonk Aug 24, 2026
1096a84
docs: bundle changes
mendonk Aug 24, 2026
3ced29c
docs: preflight checks
mendonk Aug 24, 2026
b071fa2
docs: interpreter vm
mendonk Aug 24, 2026
765020a
docs: langflow observability doctor
mendonk Aug 24, 2026
7c75930
docs: linking cleanup and new bundle components
mendonk Aug 24, 2026
f137f77
docs: opt-in partial
mendonk Aug 24, 2026
e8c10c7
docs: deployment tweaks policy
mendonk Aug 24, 2026
d331f14
docs: move deployment tweaks to its own page
mendonk Aug 24, 2026
eae6817
docs: deployment tweaks page
mendonk Aug 24, 2026
fa0a0eb
docs: model and catalog policy
mendonk Aug 24, 2026
0b74d43
docs: links check and release notes
mendonk Aug 24, 2026
96bc543
Merge branch 'release-1.12.0' into docs-review
mendonk Aug 24, 2026
135f702
docs: set user password as superuser
mendonk Aug 25, 2026
06ba6d9
docs: add mrscraper page
mendonk Aug 25, 2026
1346095
Merge branch 'docs-review' of https://github.com/langflow-ai/langflow…
mendonk Aug 25, 2026
2b62721
Merge branch 'release-1.12.0' into docs-review
mendonk Aug 25, 2026
55a970e
docs: alloy replaces promtail (#14768)
mendonk Aug 26, 2026
a17cc44
Merge branch 'release-1.12.0' into docs-review
mendonk Aug 26, 2026
f7cfcb2
docs: move otel to first feature in release notes
mendonk Aug 26, 2026
31af4a7
Merge branch 'release-1.12.0' into docs-review
mendonk Aug 26, 2026
b654ca1
Merge branch 'release-1.12.0' into docs-review
mendonk Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions deploy/observability/grafana-loki/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

Reference stack that ingests Langflow's structured JSON logs into [Loki](https://grafana.com/oss/loki/) and visualizes them with a pre-provisioned Grafana dashboard.

Use this as a starting point. The compose file, Promtail config, and dashboard JSON are independent of the rest of `deploy/` and can be lifted into any environment.
Use this as a starting point. The compose file, Alloy config, dashboard JSON, and legacy Promtail configuration are independent of the rest of `deploy/` and can be lifted into any environment.

[Grafana Alloy](https://grafana.com/oss/alloy/) replaced [Promtail](https://grafana.com/docs/alloy/latest/set-up/migrate/from-promtail/), which reached end of life on March 2, 2026.

## What you get

- **Loki 3.2** on `:3100`
- **Promtail 3.2** scraping a directory of Langflow log files
- **Alloy 1.18** scraping a directory of Langflow log files
- **Grafana 11.3** on `:3000` with the Loki datasource and the `Langflow Logs` dashboard already provisioned

## Prerequisites on the Langflow side
Expand All @@ -22,17 +24,9 @@ LANGFLOW_VERSION=1.10.0
LANGFLOW_ENVIRONMENT=production
```

Promtail scrapes a directory of `*.log` files, so `LANGFLOW_LOG_FILE` must point at a file inside
the directory you expose to Promtail as `LANGFLOW_LOG_DIR` (see [Run](#run)). Set both to the same
directory, otherwise Promtail watches an empty folder and the dashboard stays blank. Use an
absolute path: `LANGFLOW_LOG_FILE` is resolved against Langflow's working directory, not this one.
Alloy scrapes a directory of `*.log` files, so `LANGFLOW_LOG_FILE` must point at a file inside the directory you expose to Alloy as `LANGFLOW_LOG_DIR` (see [Run](#run)). Set both to the same directory, otherwise Alloy watches an empty folder and the dashboard stays blank. Use an absolute path: `LANGFLOW_LOG_FILE` is resolved against Langflow's working directory, not this one.

In JSON mode the file is a single JSON stream: application logs and third-party stdlib loggers
(`uvicorn`, `sqlalchemy`, `httpx`, `langchain`) are all rendered as JSON and run through PII
redaction, so the `json` parse stage and the **Stdlib intercept routing** panel work against it
directly. This stack scrapes a file, so `LANGFLOW_LOG_FILE` is required. If you instead run
Langflow as a container, you can drop the file and scrape its stdout by swapping Promtail's
`static_configs` file target for `docker_sd_configs` (same JSON, same labels).
In JSON mode the file is a single JSON stream: application logs and third-party stdlib loggers (`uvicorn`, `sqlalchemy`, `httpx`, `langchain`) are all rendered as JSON and run through PII redaction, so the `stage.json` parse stage and the **Stdlib intercept routing** panel work against it directly. This stack scrapes a file, so `LANGFLOW_LOG_FILE` is required. If you instead run Langflow as a container, you can drop the file and scrape its stdout by swapping Alloy's `loki.source.file` target for [`loki.source.docker`](https://grafana.com/docs/alloy/latest/reference/components/loki/loki.source.docker/).

See [Logs and observability](../../../docs/docs/Develop/observability-grafana-loki.mdx) for the full list of environment variables (per-logger overrides, extra PII redaction keys, trace correlation, etc.).

Expand All @@ -41,7 +35,7 @@ See [Logs and observability](../../../docs/docs/Develop/observability-grafana-lo
From this directory:

```bash
# Point Promtail at the directory that holds the file you set in
# Point Alloy at the directory that holds the file you set in
# LANGFLOW_LOG_FILE above. Must be the same directory. Defaults to the
# bundled ./logs (used by the quick smoke test below).
export LANGFLOW_LOG_DIR=/absolute/path/to/langflow/logs
Expand All @@ -59,16 +53,15 @@ docker compose down -v

### Quick smoke test (no Langflow required)

To verify the stack end to end without running Langflow, write a sample record into the bundled
`./logs` directory and query Loki directly:
To verify the stack end to end without running Langflow, write a sample record into the bundled `./logs` directory and query Loki directly:

```bash
mkdir -p logs
echo '{"event":"smoke test","level":"info","logger":"langflow.api.run","timestamp":"2026-06-01T00:00:00Z","service":"langflow","environment":"production","version":"1.10.0"}' >> logs/langflow.log

docker compose up -d

# Give Promtail a few seconds to tail the file, then confirm the line reached Loki:
# Give Alloy a few seconds to tail the file, then confirm the line reached Loki:
sleep 5
curl -sG 'http://localhost:3100/loki/api/v1/query_range' --data-urlencode 'query={job="langflow"}' | grep -q "smoke test" && echo "OK: log reached Loki"
```
Expand All @@ -87,6 +80,6 @@ curl -sG 'http://localhost:3100/loki/api/v1/query_range' --data-urlencode 'query

## Notes

- Promtail only promotes `level`, `service`, `environment`, `version`, `logger` to labels. High-cardinality fields (`user_id`, `flow_id`, `trace_id`) stay in the log body — query them with `| json` in LogQL.
- Replace Promtail with [Grafana Alloy](https://grafana.com/oss/alloy/) if you already standardize on it; the JSON parse stage maps 1:1.
- Alloy only promotes `level`, `service`, `environment`, `version`, `logger` to labels. High-cardinality fields (`user_id`, `flow_id`, `trace_id`) stay in the log body — query them with `| json` in LogQL.
- A legacy Promtail config remains at [`promtail/config.yml`](./promtail/config.yml) for reference. Promtail reached end of life on March 2, 2026 and is not started by compose. Grafana documents a [Promtail-to-Alloy conversion](https://grafana.com/docs/alloy/latest/set-up/migrate/from-promtail/).
- If your runtime ships logs through a different transport (Fluent Bit, Vector, OTLP), only the scrape side changes — the dashboard and label schema stay the same.
48 changes: 48 additions & 0 deletions deploy/observability/grafana-loki/alloy/config.alloy
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
logging {
level = "info"
format = "logfmt"
}

local.file_match "langflow" {
path_targets = [
{
__path__ = "/var/log/langflow/*.log",
job = "langflow",
},
]
}

loki.source.file "langflow" {
targets = local.file_match.langflow.targets
forward_to = [loki.process.langflow.receiver]
}

loki.process "langflow" {
stage.json {
expressions = {
level = "level",
service = "service",
environment = "environment",
version = "version",
logger = "logger",
}
}

stage.labels {
values = {
level = "",
service = "",
environment = "",
version = "",
logger = "",
}
}

forward_to = [loki.write.default.receiver]
}

loki.write "default" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}
14 changes: 9 additions & 5 deletions deploy/observability/grafana-loki/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ services:
timeout: 3s
retries: 20

promtail:
image: grafana/promtail:3.2.0
container_name: lf-promtail
alloy:
image: grafana/alloy:v1.18.1
container_name: lf-alloy
volumes:
- ./promtail/config.yml:/etc/promtail/config.yml
- ./alloy/config.alloy:/etc/alloy/config.alloy:ro
# Mount the directory that holds your langflow JSON log file.
# Override LANGFLOW_LOG_DIR to point at your real log location.
- ${LANGFLOW_LOG_DIR:-./logs}:/var/log/langflow:ro
command: -config.file=/etc/promtail/config.yml
command:
- run
- --server.http.listen-addr=127.0.0.1:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy
depends_on:
loki:
condition: service_healthy
Expand Down
4 changes: 4 additions & 0 deletions deploy/observability/grafana-loki/promtail/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# LEGACY. Promtail reached end of life on 2026-03-02 and is not used by this stack.
# The compose file runs Grafana Alloy instead.
# For more on converting this file, see the Grafana documentation: https://grafana.com/docs/alloy/latest/set-up/migrate/from-promtail/

server:
http_listen_port: 9080
grpc_listen_port: 0
Expand Down
Loading
Loading