Skip to main content

Do I need to create spans for profiling in trace mode?

Updated over a month ago

Issue

When I add profiling in trace mode to my app, do I still need to add functions that start and stop spans?

Applies To

  • Paying SaaS Customers

  • Profiling

Resolution

No you do not need to manually start and stop spans when you add profiling in trace mode! All you need to do is make sure that you are enabling automatic instrumentation for tracing too, as instructed in your SDK's docs.

Of course, you are free to set up any manual instrumentation that you need too. The profiler continues to run while there is at least one active span, and stops when there are no active spans.

Did this answer your question?