Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
🚧 This project is currently a work in progress. Therefore, the following issues may exist:

- On-disk data structures and API endpoints may change and may not be backward compatible.
- Some links point to incorrect locations.
- Some static files are unavailable.
Expand Down Expand Up @@ -33,12 +34,12 @@ Both the single-node and the cluster versions of VictoriaTraces are open source

Feel free asking any questions regarding VictoriaTraces:

* [Slack Inviter](https://slack.victoriametrics.com/) and [Slack channel](https://victoriametrics.slack.com/)
* [X (Twitter)](https://x.com/VictoriaMetrics/)
* [Linkedin](https://www.linkedin.com/company/victoriametrics/)
* [Reddit](https://www.reddit.com/r/VictoriaMetrics/)
* [Telegram](https://t.me/VictoriaTraces)
* [Mastodon](https://mastodon.social/@victoriametrics/)
- [Slack Inviter](https://slack.victoriametrics.com/) and [Slack channel](https://victoriametrics.slack.com/)
- [X (Twitter)](https://x.com/VictoriaMetrics/)
- [Linkedin](https://www.linkedin.com/company/victoriametrics/)
- [Reddit](https://www.reddit.com/r/VictoriaMetrics/)
- [Telegram](https://t.me/VictoriaTraces)
- [Mastodon](https://mastodon.social/@victoriametrics/)

If you like VictoriaTraces and want to contribute, then please [read these docs](https://docs.victoriametrics.com/victoriametrics/contributing/).

Expand Down
2 changes: 1 addition & 1 deletion app/vtselect/logsql/logsql.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ func ProcessStreamsRequest(ctx context.Context, w http.ResponseWriter, r *http.R
WriteValuesWithHitsJSON(w, streams)
}

// ProcessLiveTailRequest processes live tailing request to /select/logsq/tail
// ProcessLiveTailRequest processes live tailing request to /select/logsql/tail
//
// See https://docs.victoriametrics.com/victorialogs/querying/#live-tailing
func ProcessLiveTailRequest(ctx context.Context, w http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion app/vtselect/traces/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (cp *CommonParams) UpdatePerQueryStatsMetrics() {
func GetCommonParams(r *http.Request) (*CommonParams, error) {
tenantID, err := logstorage.GetTenantIDFromRequest(r)
if err != nil {
return nil, fmt.Errorf("cannot obtain tenanID: %w", err)
return nil, fmt.Errorf("cannot obtain tenantID: %w", err)
}
tenantIDs := []logstorage.TenantID{tenantID}
cp := &CommonParams{
Expand Down
6 changes: 3 additions & 3 deletions apptest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ work together as a system.
The package provides a collection of helpers to start applications and make
queries to them:

- `app.go` - contains the generic code for staring an application and should
- `app.go` - contains the generic code for staring an application and should
not be used by integration tests directly.
- `{vtsingle,etc}.go` - build on top of `app.go` and provide the
- `{vtsingle,etc}.go` - build on top of `app.go` and provide the
code for staring a specific application.
- `client.go` - provides helper functions for sending HTTP requests to
- `client.go` - provides helper functions for sending HTTP requests to
applications.

The integration tests themselves reside in `tests/*_test.go` files. Apart from having
Expand Down
2 changes: 1 addition & 1 deletion dashboards/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# VictoriaTraces dashboards

The directory contains the official list of Grafana dashboards for VictoriaTraces components.
The `vm` folder contains copies of the listed dashboards but alternated to use
The `vm` folder contains copies of the listed dashboards but alternated to use
[VictoriaMetrics datasource](https://github.com/VictoriaMetrics/victoriametrics-datasource).

The listed dashboards can be found on [Grafana website](https://grafana.com/orgs/victoriametrics/dashboards).
Expand Down
35 changes: 24 additions & 11 deletions deployment/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Docker compose environment for VictoriaTraces includes VictoriaTraces components and [Grafana](https://grafana.com/).

For starting the docker-compose environment ensure that you have docker installed and running, and that you have access
to the Internet.
to the Internet.
**All commands should be executed from the root directory of [the VictoriaTraces repo](https://github.com/VictoriaMetrics/VictoriaTraces).**

* Traces:
Expand All @@ -16,6 +16,7 @@ to the Internet.
## VictoriaTraces server

To spin-up environment with [VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/), run the following command:

```sh
# clone VictoriaTraces
git clone https://github.com/VictoriaMetrics/VictoriaTraces.git
Expand All @@ -24,11 +25,13 @@ cd VictoriaTraces
# start docker compose
make docker-vt-single-up
```

_See [compose-vt-single.yml](https://github.com/VictoriaMetrics/VictoriaTraces/blob/master/deployment/docker/compose-vt-single.yml)_

VictoriaTraces will be accessible on the `--httpListenAddr=:10428` port.

In addition to VictoriaTraces server, the docker compose contains the following components:

* [HotROD](https://hub.docker.com/r/jaegertracing/example-hotrod) application to generate trace data.
* `VictoriaMetrics single-node` to collect metrics from all the components.
* [Grafana](#grafana) is configured with [VictoriaMetrics](https://github.com/VictoriaMetrics/victoriametrics-datasource) and Jaeger datasource pointing to VictoriaTraces server.
Expand All @@ -45,17 +48,20 @@ To access [VictoriaTraces UI](https://docs.victoriametrics.com/victoriatraces/qu
use link [http://localhost:10428/select/vmui](http://localhost:10428/select/vmui).

To shut down environment execute the following command:
```

```sh
make docker-vt-single-down
```

## VictoriaTraces cluster

To spin-up environment with [VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/) **cluster**, run the following command:

```sh
# start docker compose
make docker-vt-cluster-up
```

_See [compose-vt-cluster.yml](https://github.com/VictoriaMetrics/VictoriaTraces/blob/master/deployment/docker/compose-vt-cluster.yml)_

VictoriaTraces cluster environment consists of `vtinsert`, `vtstorage` and `vtselect` components.
Expand All @@ -64,6 +70,7 @@ For example, `HotROD` pushes trace spans via `http://vmauth:8427/insert/opentele
and Grafana queries `http://vmauth:8427/select/jaeger/` for datasource queries.

In addition to VictoriaTraces cluster, the docker compose contains the following components:

* [HotROD](https://hub.docker.com/r/jaegertracing/example-hotrod) application to generate trace data.
* `VictoriaMetrics single-node` to collect metrics from all the components.
* [Grafana](#grafana) is configured with [VictoriaMetrics](https://github.com/VictoriaMetrics/victoriametrics-datasource) and Jaeger datasource pointing to VictoriaTraces cluster (vmauth).
Expand All @@ -79,7 +86,8 @@ To access [VictoriaTraces UI](https://docs.victoriametrics.com/victoriatraces/qu
use link [http://localhost:8427/select/vmui](http://localhost:8427/select/vmui).

To shut down environment execute the following command:
```

```sh
make docker-vt-cluster-down
```

Expand All @@ -103,8 +111,9 @@ vmalert-traces evaluates [alerting rules](https://github.com/VictoriaMetrics/Vic
They are connected with AlertManager for firing alerts.

Web interface link:
- vmalert-metrics: [http://localhost:8880/](http://localhost:8880/).
- vmalert-traces: [http://localhost:8881/](http://localhost:8881/).

* vmalert-metrics: [http://localhost:8880/](http://localhost:8880/).
* vmalert-traces: [http://localhost:8881/](http://localhost:8881/).

## alertmanager

Expand All @@ -118,6 +127,7 @@ Web interface link [http://localhost:9093/](http://localhost:9093/).
Web interface link [http://localhost:3000](http://localhost:3000).

Default credentials:

* login: `admin`
* password: `admin`

Expand All @@ -126,30 +136,33 @@ Grafana is provisioned with default dashboards and datasources.
## Troubleshooting

This environment has the following requirements:

* installed [docker compose](https://docs.docker.com/compose/);
* access to the Internet for downloading docker images;
* **All commands should be executed from the root directory of [the VictoriaTraces repo](https://github.com/VictoriaMetrics/VictoriaTraces).**

The expected output of running a command like `make docker-vm-single-up` is the following:

```sh
make docker-vm-single-up :(
docker compose -f deployment/docker/compose-vm-single.yml up -d
[+] Running 9/9
✔ Network docker_default Created 0.0s
✔ Volume "docker_vmagentdata" Created 0.0s
✔ Container docker-alertmanager-1 Started 0.3s
✔ Container docker-victoriametrics-1 Started 0.3s
...
✔ Network docker_default Created 0.0s
✔ Volume "docker_vmagentdata" Created 0.0s
✔ Container docker-alertmanager-1 Started 0.3s
✔ Container docker-victoriametrics-1 Started 0.3s
...
```

Containers are started in [--detach mode](https://docs.docker.com/reference/cli/docker/compose/up/), meaning they run in the background.
As a result, you won't see their logs or exit status directly in the terminal.

If something isn’t working as expected, try the following troubleshooting steps:

1. Run from the correct directory. Make sure you're running the command from the root of the [VictoriaTraces repository](https://github.com/VictoriaMetrics/VictoriaTraces).
2. Check container status. Run `docker ps -a` to list all containers and their status. Healthy and running containers should have `STATUS` set to `Up`.
3. View container logs. To inspect logs for a specific container, get its container ID from step p2 and run: `docker logs -f <containerID>`.
4. Read the logs carefully and follow any suggested actions.
5. Check for port conflicts. Some containers (e.g., Grafana) expose HTTP ports. If a port (like `:3000`) is already in use, the container may fail to start. Stop the conflicting process or change the exposed port in the Docker Compose file.
6. Shut down the deployment. To tear down the environment, run: `make <environment>-down` (i.e. `make docker-vm-single-down`).
Note, this command also removes all attached volumes, so all the temporary created data will be removed too (i.e. Grafana dashboards or collected metrics).
Note, this command also removes all attached volumes, so all the temporary created data will be removed too (i.e. Grafana dashboards or collected metrics).
28 changes: 15 additions & 13 deletions docs/victoriatraces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ sitemap:
disable: true
---

VictoriaTraces is an open-source, user-friendly database designed for storing and querying distributed [tracing data](https://en.wikipedia.org/wiki/Tracing_(software)),
VictoriaTraces is an open-source, user-friendly database designed for storing and querying distributed [tracing data](https://en.wikipedia.org/wiki/Tracing_(software)),
built by the [VictoriaMetrics](https://github.com/VictoriaMetrics) team.

## Prominent features

VictoriaTraces provides the following prominent features:

- It is resource-efficient and fast. It uses up to [**3.7x less RAM and up to 2.6x less CPU**](https://victoriametrics.com/blog/dev-note-distributed-tracing-with-victorialogs/) than other solutions such as Grafana Tempo.
- VictoriaTraces' capacity and performance scales linearly with the available resources (CPU, RAM, disk IO, disk space). Also, it can scale horizontally to many nodes in [cluster mode](https://docs.victoriametrics.com/victoriatraces/cluster/).
- It has no additional storage dependencies (such as object storage or external databases like ClickHouse and Elasticsearch) for production readiness.
- It accepts trace spans in the popular [OpenTelemetry protocol](https://opentelemetry.io/docs/specs/otel/protocol/)(OTLP).
- It provides [Jaeger Query Service JSON APIs](https://www.jaegertracing.io/docs/2.6/apis/#internal-http-json)
- It provides [Jaeger Query Service JSON APIs](https://www.jaegertracing.io/docs/2.6/apis/#internal-http-json)
to integrate with [Grafana](https://grafana.com/docs/grafana/latest/datasources/jaeger/) or [Jaeger Frontend](https://www.jaegertracing.io/docs/2.6/frontend-ui/).
- It supports alerting - see [these docs](https://docs.victoriametrics.com/victoriatraces/vmalert/).

Expand All @@ -33,22 +34,23 @@ Building from sources is reasonable when developing additional features specific

{{% collapse name="How to build from sources" %}}

Clone VictoriaTraces repository:
```bash
Clone VictoriaTraces repository:

```bash
git clone https://github.com/VictoriaMetrics/VictoriaTraces.git;
cd VictoriaTraces;
```

#### Build binary with go build

1. [Install Go](https://golang.org/doc/install).
2. Run `make victoria-traces` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaTraces).
2. Run `make victoria-traces` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaTraces).
It builds `victoria-traces` binary and puts it into the `bin` folder.

#### Build binary with Docker

1. [Install docker](https://docs.docker.com/install/).
2. Run `make victoria-traces-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaTraces).
2. Run `make victoria-traces-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaTraces).
It builds `victoria-traces-prod` binary and puts it into the `bin` folder.

#### Building docker images
Expand All @@ -69,8 +71,8 @@ ROOT_IMAGE=scratch make package-victoria-traces

### Configure VictoriaTraces

VictoriaTraces is configured via command-line flags.
All the command-line flags have sane defaults, so there is no need in tuning them in general case.
VictoriaTraces is configured via command-line flags.
All the command-line flags have sane defaults, so there is no need in tuning them in general case.
VictoriaTraces runs smoothly in most environments without additional configuration.

Pass `-help` to VictoriaTraces in order to see the list of supported command-line flags with their description and default values:
Expand All @@ -81,10 +83,10 @@ Pass `-help` to VictoriaTraces in order to see the list of supported command-lin

The following command-line flags are used the most:

* `-storageDataPath` - VictoriaTraces stores all the data in this directory. The default path is `victoria-traces-data` in the current working directory.
* `-retentionPeriod` - retention for stored data. Older data is automatically deleted. Default retention is 7 days.
- `-storageDataPath` - VictoriaTraces stores all the data in this directory. The default path is `victoria-traces-data` in the current working directory.
- `-retentionPeriod` - retention for stored data. Older data is automatically deleted. Default retention is 7 days.

You can find the list of the command-line flags can be found [here](#list-of-command-line-flags).
You can find the list of the [command-line flags](#list-of-command-line-flags).

## High Availability

Expand Down Expand Up @@ -255,7 +257,7 @@ For example, the following command starts VictoriaTraces, which stores the data
```

VictoriaTraces automatically creates the `-storageDataPath` directory on the first run if it is missing. VictoriaTraces stores trace spans
per every day into a seperated subdirectory (aka per-day partition). See [partitions lifecycle](#partitions-lifecycle) for details.
per every day into a separated subdirectory (aka per-day partition). See [partitions lifecycle](#partitions-lifecycle) for details.

VictoriaTraces switches to cluster mode if `-storageNode` command-line flag is specified:

Expand Down Expand Up @@ -287,7 +289,7 @@ These endpoints can be protected from unauthorized access via `-partitionManageA
These endpoints can be used for building a flexible per-partition backup / restore schemes as described [in these docs](#backup-and-restore).

These endpoints can be used also for setting up automated multi-tier storage schemes where recently ingested data is stored to VictoriaTraces instances
with fast NVMe (SSD) disks, while historical data is gradully migrated to VictoriaTraces instances with slower, but bigger and less expensive HDD disks.
with fast NVMe (SSD) disks, while historical data is gradually migrated to VictoriaTraces instances with slower, but bigger and less expensive HDD disks.
This scheme can be implemented with the following simple cron job, which must run once per day:

1. To copy per-day partition for the older day stored at NVMe from NVMe to HDD, with the help of [`rsync`](https://en.wikipedia.org/wiki/Rsync).
Expand Down
4 changes: 2 additions & 2 deletions docs/victoriatraces/changelog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following `tip` changes can be tested by building VictoriaTraces components
* FEATURE: [docker compose](https://github.com/VictoriaMetrics/VictoriaTraces/tree/master/deployment/docker): add cluster docker compose environment.
* FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaTraces/blob/master/dashboards): update dashboard for VictoriaTraces single-node and cluster to provide more charts.

* BUGFIX: [Single-node VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/) and vtinsert in [VictoriaTraces cluster](https://docs.victoriametrics.com/victoriatraces/cluster/): Rename various [HTTP headers](https://docs.victoriametrics.com/victoriatraces/data-ingestion/#http-headers) prefix from `VL-` to `VT-`. These headers help with debugging and customizing stream fields. Thank @JayiceZ for [the pull request](https://github.com/VictoriaMetrics/VictoriaTraces/pull/56).
* BUGFIX: [Single-node VictoriaTraces](https://docs.victoriametrics.com/victoriatraces/) and vtinsert in [VictoriaTraces cluster](https://docs.victoriametrics.com/victoriatraces/cluster/): Rename various [HTTP headers](https://docs.victoriametrics.com/victoriatraces/data-ingestion/#http-headers) prefix from `VL-` to `VT-`. These headers help with debugging and customizing stream fields. Thank @JayiceZ for [the pull request](https://github.com/VictoriaMetrics/VictoriaTraces/pull/56).
* BUGFIX: all components: properly expose metadata for summaries and histograms in VictoriaMetrics components with enabled `-metrics.exposeMetadata` cmd-line flag. See [metrics#98](https://github.com/VictoriaMetrics/metrics/issues/98) for details.

## [v0.2.0](https://github.com/VictoriaMetrics/VictoriaTraces/releases/tag/v0.2.0)
Expand All @@ -29,7 +29,7 @@ Released at 2025-09-01
* SECURITY: upgrade base docker image (Alpine) from 3.22.0 to 3.22.1. See [Alpine 3.22.1 release notes](https://www.alpinelinux.org/posts/Alpine-3.19.8-3.20.7-3.21.4-3.22.1-released.html).

* FEATURE: [logstorage](https://docs.victoriametrics.com/victorialogs/): Upgrade VictoriaLogs dependency from [v1.25.1 to v1.27.0](https://github.com/VictoriaMetrics/VictoriaLogs/compare/v1.25.1...v1.27.0).
* FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaTraces/blob/master/dashboards): add dashboard for VictoriaTraces single-node and cluster.
* FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaTraces/blob/master/dashboards): add dashboard for VictoriaTraces single-node and cluster.

## [v0.1.0](https://github.com/VictoriaMetrics/VictoriaTraces/releases/tag/v0.1.0)

Expand Down
Loading