Tracing

Add OpenTelemetry tracing to VeilNet Conflux. Export traces to any OTLP backend and correlate network and app requests.

Open Telemetry

OpenTelemetry (often shortened to OTel) is an open, vendor‑neutral standard for generating and exporting telemetry data from your software. It defines a common way to collect the three core observability signals:

  • Traces: end‑to‑end request flows across services (what happened, where time was spent)
  • Metrics: numeric measurements over time (rates, counts, latency distributions)
  • Logs: structured events for debugging and auditing

In this guide, we focus on tracing so you can understand what the VeilNet Conflux subprocess is doing, correlate network-layer activity with your application requests, and export that data to your preferred backend (for example, via an OpenTelemetry Collector).

Enable Tracing

You can enable tracing by creating a tracer configuration, and passing it when starting the VeilNet Conflux subprocess. VeilNet Conflux will then export traces to your preferred backend every 10 seconds. This has very low overhead and is suitable for most applications.

package main

import (
    "fmt"
    "log"
    "net/http"
    "github.com/veil-net/conflux/anchor"
)

func main() {

    // Configure the tracer
    traceConfig := &anchor.TracerConfig{
      Enabled: true,
      Endpoint: "your-otlp-endpoint",
      UseTLS: true,
      Insecure: false,
      CAFile: "path/to/ca.crt",
      CertFile: "path/to/cert.crt",
      KeyFile: "path/to/key.pem",
    }

    // Start the VeilNet Conflux Plugin
    subprocess, anchor, err := anchor.StartConflux(token string, tag string, ip string, nil, traceConfig)
    if err != nil {
        return err
    }

    // Add taint to the conflux node
    _, err = anchor.AddTaint(context.Background(), &pb.AddTaintRequest{
            Taint: "test",
        })
      if err != nil {
      return
      }

    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
        fmt.Fprintf(w, "Hello World")
    })
    http.ListenAndServe(fmt.Sprintf("%s:8080", ip), nil)
}

VeilNet Conflux supports exporting traces to any OpenTelemetry Collector over OTLP/HTTP. That means you can point Conflux at a local Collector, a self‑hosted Collector, or a vendor’s hosted OTLP endpoint.

Common platforms/tools you can send traces to (typically via a Collector or an OTLP/HTTP ingestion endpoint) include:

  • OpenTelemetry Collector (self-hosted)http://<collector-host>:4318/v1/traces
  • Grafana Tempo / Grafana Cloud — OTLP/HTTP ingestion (often via a Collector)
  • Jaeger — via an OpenTelemetry Collector exporter
  • Honeycomb — OTLP/HTTP endpoint (often requires an API key header)
  • Datadog — via the Datadog Agent/Collector OTLP intake
  • New Relic — OTLP endpoint (often requires an API key header)
  • Elastic APM — via an OpenTelemetry Collector exporter
  • AWS X-Ray / ADOT — via an OpenTelemetry Collector configured for AWS

VeilNet • © 2026 All rights reserved