Debugging Tips
If tracing isn't working as expected, check the following:
1. Verify Plugin Application
Ensure the Tracy Gradle plugin is applied:
2. Check Plugin Is Enabled
The plugin can be disabled via Gradle properties:
3. Verify SDK Is Set
Tracing requires an OpenTelemetry SDK:
4. Check Tracing Is Enabled
Tracing is disabled by default. Enable it via environment variable:
Or programmatically:
See Configuration for details.
5. Ensure Traces Are Flushed
Traces are automatically flushed based on
ExporterCommonSettings:
- Periodically: via
flushIntervalMsandflushThreshold - On shutdown: via JVM shutdown hook if
flushOnShutdown = true
Or flush manually:
See Flushing and Shutdown for details.
6. Fixing Generic Parameter Names (arg0, arg1)
If your traces show generic parameter names like arg0 or arg1 instead of the actual names from your code, you need
to enable the -java-parameters compiler flag.
Add the following to your build.gradle.kts:
This flag instructs the Kotlin compiler to generate metadata for method parameters, allowing Tracy to retrieve their names via reflection.
Limitations
The compiler plugin has some limitations (local functions, inline lambdas, Java interoperability). See the Limitations page for details.