# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: VictoriaTraces
spec:
    description: An open-source, user-friendly database designed for storing and querying distributed tracing data
    coverImage: https://cdn.zeabur.com/templates/cover-image/victoriatraces.png
    icon: https://cdn.zeabur.com/templates/icon/victoriametrics.svg
    tags:
        - monitoring
        - observability
        - tracing
    readme: |
        VictoriaTraces is an open source user-friendly database designed for storing and querying distributed tracing data, allowing you to store and query your traces in a simple and easy-to-use interface. It is a good alternative to Tempo, which consumes up to 3.7x less RAM and up to 2.6x less CPU.

        For more information about VictoriaTraces, please refer to [their docs](https://docs.victoriametrics.com/victoriatraces/).

        ## Usage

        You can find the port mapping (`10428`) from the “Networking” tab in the “Services” section.

        Usually, you ingest the traces to VictoriaTraces with [OpenTelemetry SDK](https://docs.victoriametrics.com/victoriatraces/data-ingestion/). Then, you can query the traces with VictoriaTraces's Web UI at `https://your-domain/select/vmui` (where `your-domain` binds to the port 10428) and with [Grafana](https://zeabur.com/templates/MDTTQR).

        By default, the data retention period is 14 days. You can change it by modifying the `-retentionPeriod` argument in the Command section of the Settings tab of this service. See [Retention](https://docs.victoriametrics.com/victoriatraces/#retention) section in VictoriaTraces' docs for more information.

        Check [VictoriaTraces' docs](https://docs.victoriametrics.com/victoriatraces/) for more information.
    services:
        - name: victoriatraces
          icon: https://cdn.zeabur.com/templates/icon/victoriametrics.svg
          template: PREBUILT
          spec:
            source:
                image: victoriametrics/victoria-traces:v0.5.1
                command:
                    - /victoria-traces-prod
                args:
                    - -storageDataPath=/victoria-traces-data
                    - -retentionPeriod=14d
            ports:
                - id: web
                  port: 10428
                  type: HTTP
            volumes:
                - id: data
                  dir: /victoria-traces-data
