Skip to main content

Considerations

In Odigos open source, Custom Instrumentation is supported for PHP applications using the community native OpenTelemetry distro. Custom eBPF-based instrumentations for Go and Java require Odigos Enterprise. PHP probes are delivered as environment variables and require a pod restart to take effect.

Configuration Options

className string - The fully qualified class name to instrument. Leave empty for a global function. - This field is optional
functionName string - The name of the function or method to instrument. - This field is required

Basic Example

The following example instruments the processOrder method on App\Service\OrderService.
1
Create a YAML file named custom-instrumentation.yaml with the following content:
2
Apply the rule to the cluster:
3
Restart the PHP workload so the new ODIGOS_PHP_AGENT_CUSTOM_INSTRUMENTATIONS environment variable is picked up.