trace.init() parameter.
Environment variables
Set these variables in your shell,.env file, or container environment before starting your application. Environment variables are the recommended approach for production deployments because they keep credentials and infrastructure details out of your source code.
trace.init() parameter reference
Parameters passed directly totrace.init() take precedence over their corresponding environment variables.
The project or agent name. Must match the project name you created in the
Veritrix dashboard. Names are case-sensitive.
Your Veritrix API key. Omit this in production and supply the key through the
VERITRIX_API_KEY environment variable instead so it never appears in source
code or version control.The OpenTelemetry (OTel) exporter endpoint that spans are sent to. Override
this only if you are routing telemetry through your own OTel collector or
running a self-hosted Veritrix deployment. Corresponds to the
VERITRIX_ENDPOINT environment variable.When
True, the SDK prints every span payload to stdout as it is emitted.
Useful for verifying that tracing is working during local development.
Corresponds to the VERITRIX_DEBUG environment variable. Never enable in
production.Custom OTel endpoint
If your organisation runs its own OpenTelemetry collector — for example, as part of an enterprise self-hosting arrangement or a private network deployment — point the SDK at it using theendpoint parameter or the VERITRIX_ENDPOINT variable.
The endpoint must expose the standard OTel gRPC port (
4317) or HTTP port
(4318). Veritrix uses the OTLP exporter protocol and is compatible with
any OTel-compliant collector, including the OpenTelemetry Collector, Grafana
Alloy, and Datadog Agent.Debug mode
Enabling debug mode writes every span payload as formatted JSON tostdout at the moment it is emitted. This is the fastest way to confirm that trace.init() is working correctly and to inspect exactly what data is being sent.
Configuration precedence
When the same option is set in multiple places, Veritrix resolves the value in this order, from highest to lowest priority:- Argument passed directly to
trace.init() - Corresponding environment variable (
VERITRIX_API_KEY,VERITRIX_ENDPOINT,VERITRIX_DEBUG) - SDK default