method_hotspots
Identify which methods consume the most time in a service or process group from Dynatrace stack samples. Reveal hot methods and call trees to locate performance bottlenecks.
Instructions
Shows which methods a service or process group spends its time in, from Dynatrace code-level stack samples: sample share per API (framework / library group) and per thread state, then the hot methods.
view: "flat" (default) ranks methods by self share (samples where the method itself was on top of the stack) and also gives the total share including callees. view: "tree" prints the call tree from the thread entry points downwards, pruned to branches above min_share_percent.
By default only active states are counted (running on CPU, locking, network and disk I/O); include_waiting: true adds waiting threads.
Pass exactly one of service or process_group (id or name; ids come from list_services, trace_statistics or cpu_by_process_group). Numbers are stack samples, not milliseconds; compare shares. Follow up with thread_analysis for the thread groups behind the samples.
This tool runs through the Dynatrace Bridge browser extension in the user's logged-in browser. If it fails, report the error to the user; do not try to open browser tabs or use browser automation instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Flat view only: keep methods whose name or API contains this text (case-insensitive). | |
| view | No | flat (default): top methods by self share. tree: pruned call tree. | |
| limit | No | Maximum number of methods (flat view, at most 200) or tree lines (tree view, default 40, at most 300) to print. Default 20. The output says how many were omitted. | |
| service | No | The service whose code to profile, as an entity id (SERVICE-1234567890ABCDEF) or a name. A name that matches several entities returns the candidates instead of guessing. | |
| time_to | No | Absolute end time, ISO 8601; without a zone it is read as UTC. Without time_from, the window starts minutes_lookback before this. Must not be in the future. | |
| time_from | No | Absolute start time, ISO 8601 (e.g. '2026-09-23T10:28:00Z'). A timestamp without a zone (Z or ±hh:mm) is read as UTC. Without time_to, the window runs from here to now. Must not be in the future. | |
| environment | No | Which Dynatrace environment to query, as named in the Dynatrace Bridge extension popup. Omit it for the default, the first environment configured there. The names are not listed here because the extension had not connected yet when this description was built; `dynatrace_bridge_status` lists them. | |
| process_group | No | The process group to profile, as an entity id (PROCESS_GROUP-1234567890ABCDEF) or a name. A name that matches several entities returns the candidates instead of guessing. | |
| include_waiting | No | Also count samples of waiting threads. Default false. | |
| minutes_lookback | No | Window length in minutes. Default 120. With neither time_from nor time_to it means the last N minutes up to now; with only time_to it means the N minutes ending at time_to; ignored when time_from is given. The response header always shows the resolved absolute UTC window. | |
| min_share_percent | No | Tree view only: hide branches below this share of all samples (0-100). Default 1. |