Skip to main content

Profiler ENV and CLI args

This page provides a comprehensive reference for all zymtrace profiler configuration options, including both command-line arguments and environment variables.

GPU Profiler Configuration

For GPU-specific profiler environment variables, see GPU Profiler Environment Variables.

Configuration Priority

The zymtrace profiler prioritizes its settings in the following order (highest to lowest):

  • Command-line arguments
  • Environment variables
  • Configuration file

Configuration Options​

CLI ArgumentEnvironment VariableDescription
-collection-agentZYMTRACE_COLLECTION_AGENTSet the destination for reporting profiling information. This should point to your gateway service. Example: -collection-agent=example.com:443. Default is empty.
-disable-tlsZYMTRACE_DISABLE_TLSDisable encryption for data in transit. Example: -disable-tls. Default is false.
-projectZYMTRACE_PROJECTProject name to associate with profiling data. This is necessary for logical grouping of data in the backend, e.g., a developer who wants to quickly profile a workload and delete it after. The agent automatically creates the project if the specified string doesn't exist in the backend. Alternatively, create the project in the backend and specify the string in the agent. Avoid using spaces. In the near future, RBAC will define who can see or create projects. Example: -project=my-project. Default is default.
-auth-tokenZYMTRACE_AUTH_TOKENToken used to authenticate with the backend, if service authentication is enabled in the backend. Example: -auth-token=myauthtoken
-probabilistic-intervalZYMTRACE_PROBABILISTIC_INTERVALSet the time interval for probabilistic profiling. See Enable probabilistic sampling for details. Example: -probabilistic-interval=2m30s. Default is 1m.
-probabilistic-thresholdZYMTRACE_PROBABILISTIC_THRESHOLDSet the threshold value for probabilistic profiling. See Enable probabilistic sampling for details. Example: -probabilistic-threshold=50. Default is ProbabilisticThresholdMax.
-reporter-intervalZYMTRACE_REPORTER_INTERVALSet the reporter's interval in seconds. Example: -reporter-interval=10s. Default is 5s.
-no-kernel-version-checkZYMTRACE_NO_KERNEL_VERSION_CHECKDisable the kernel version check for eBPF support. Default is false.
-tagsZYMTRACE_TAGSSet specific tags for attaching to traces. Example: -tags='cloud_region:us-central1;env:staging'. Default is empty.
-configZYMTRACE_CONFIGSet the path for the configuration file of the zymtrace profiler. Example: -config=/etc/zymtrace/config.conf. Optional.
-pprofZYMTRACE_PPROFListening address to serve pprof information. Example: -pprof=localhost:6060. Default is empty.
-samples-per-secondZYMTRACE_SAMPLES_PER_SECONDSet the frequency (in Hz) of stack trace sampling. See Reduce the sampling rate for details. Example: -samples-per-second=50. Default is 20.
-tracersZYMTRACE_TRACERSComma-separated list of interpreter tracers to include. Example: -tracers=python,nodejs. Default is "all".
-vZYMTRACE_VERBOSERun the zymtrace profiler in verbose mode. Default is false.
-machine-idZYMTRACE_MACHINE_IDManually specify the machine ID. Example: -machine-id=12345. Default is 0.

Usage Examples​

Using CLI Arguments​

sudo ./zymtrace-profiler \
-collection-agent=gateway.company.com:443 \
-project=my-app \
-tags='env:production;region:us-west' \
-samples-per-second=30 \
-reporter-interval=10s

Using Environment Variables​

export ZYMTRACE_COLLECTION_AGENT="gateway.company.com:443"
export ZYMTRACE_PROJECT="my-app"
export ZYMTRACE_TAGS="env:production;region:us-west"
export ZYMTRACE_SAMPLES_PER_SECOND=30
export ZYMTRACE_REPORTER_INTERVAL=10s

sudo ./zymtrace-profiler

Mixed Configuration​

You can combine both methods, with CLI arguments taking precedence:

export ZYMTRACE_PROJECT="default-project"
export ZYMTRACE_TAGS="env:staging"

# CLI arguments will override the environment variables above
sudo ./zymtrace-profiler \
-project=override-project \
-collection-agent=gateway.company.com:443