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
PHP
PHP
className
className
className
string - The fully qualified class name to instrument.
Leave empty for a global function. - This field is optionalfunctionName
functionName
functionName
string - The name of the function or method to
instrument. - This field is requiredBasic Example
The following example instruments theprocessOrder 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.