Skip to main content
The odictl profiling view lets you turn a profiled function into a custom instrumentation rule with a single keystroke. Instead of typing a class, package, or method name by hand, you highlight a hot function in the profile and press iodictl generates the matching CustomInstrumentation rule for you. This UI-driven flow supports Java, Go, and C++.
This page covers the profile-driven, UI-only workflow. To define a rule manually (entering class/method or package/function yourself) or with YAML files, see Custom Instrumentation.

Before you start

Create a rule from a profile

1

Open the profiling view and select a function

From the main odictl dashboard, press Shift+P to open the profiling view. Use Tab to move between the three panes—Services, Filter modules, and Functions—and the arrow keys to move within the focused pane.
  1. In the Services pane, select a service. Its runtime (Java, Go, or C++) determines the modules shown.
  2. In the Filter modules pane, adjust the module or type filter if needed.
  3. In the Functions pane, highlight the function you want to instrument.
In this example, the odigos-demo-frontend service is selected and the highlighted function is the Java method com.fasterxml.jackson.core.json.UTF8StreamJsonParser._parseName.odictl profiling view with the _parseName function selected, before instrumenting
2

Instrument the function

Press i. The bottom-right panel updates to show the function is Instrumented. In this example, _parseName is now instrumented under the odigos-profiling-odigos-demo-frontend rule.odictl profiling view showing the _parseName function marked as Instrumented
3

Return to the dashboard

Press Esc to return to the main dashboard. A new rule appears in the Rules section, named odigos-profiling-<service-name> for the service you selected—odigos-profiling-odigos-demo-frontend in this example.
4

Review the generated rule

Highlight the rule to view its configuration. The generated config matches the runtime of the profiled function:
  • Java — the fully qualified class name and method name.
  • Go — the package and function name, or the package, receiver type, and method name.
  • C++ — the function signature.
For the underlying field reference, see Custom Instrumentation.odictl Rules section showing the generated profiling rule and its config
The rule name and config are generated automatically from the profile—you don’t enter the class, package, or method by hand. To author a rule manually instead, see Custom Instrumentation.
5

Verify the new span

Once the rule is applied, new traces include a span for the instrumented function. Open your trace backend and search for the function name (for example, _parseName) to confirm the span is being recorded.

Remove a profile-driven instrumentation

To stop instrumenting a function, reopen the profiling view (Shift+P), highlight the same function, and press i again. The panel shows [i] remove for an already-instrumented function.