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 Argument | Environment Variable | Description |
---|---|---|
-collection-agent | ZYMTRACE_COLLECTION_AGENT | Set the destination for reporting profiling information. This should point to your gateway service. Example: -collection-agent=example.com:443 . Default is empty. |
-disable-tls | ZYMTRACE_DISABLE_TLS | Disable encryption for data in transit. Example: -disable-tls . Default is false. |
-project | ZYMTRACE_PROJECT | Project 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-token | ZYMTRACE_AUTH_TOKEN | Token used to authenticate with the backend, if service authentication is enabled in the backend. Example: -auth-token=myauthtoken |
-probabilistic-interval | ZYMTRACE_PROBABILISTIC_INTERVAL | Set the time interval for probabilistic profiling. See Enable probabilistic sampling for details. Example: -probabilistic-interval=2m30s . Default is 1m. |
-probabilistic-threshold | ZYMTRACE_PROBABILISTIC_THRESHOLD | Set the threshold value for probabilistic profiling. See Enable probabilistic sampling for details. Example: -probabilistic-threshold=50 . Default is ProbabilisticThresholdMax. |
-reporter-interval | ZYMTRACE_REPORTER_INTERVAL | Set the reporter's interval in seconds. Example: -reporter-interval=10s . Default is 5s. |
-no-kernel-version-check | ZYMTRACE_NO_KERNEL_VERSION_CHECK | Disable the kernel version check for eBPF support. Default is false. |
-tags | ZYMTRACE_TAGS | Set specific tags for attaching to traces. Example: -tags='cloud_region:us-central1;env:staging' . Default is empty. |
-config | ZYMTRACE_CONFIG | Set the path for the configuration file of the zymtrace profiler. Example: -config=/etc/zymtrace/config.conf . Optional. |
-pprof | ZYMTRACE_PPROF | Listening address to serve pprof information. Example: -pprof=localhost:6060 . Default is empty. |
-samples-per-second | ZYMTRACE_SAMPLES_PER_SECOND | Set the frequency (in Hz) of stack trace sampling. See Reduce the sampling rate for details. Example: -samples-per-second=50 . Default is 20. |
-tracers | ZYMTRACE_TRACERS | Comma-separated list of interpreter tracers to include. Example: -tracers=python,nodejs . Default is "all". |
-v | ZYMTRACE_VERBOSE | Run the zymtrace profiler in verbose mode. Default is false. |
-machine-id | ZYMTRACE_MACHINE_ID | Manually 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