• Print
  • Share
  • Dark
    Light

Custom Instrumentation

  • Updated on 08 Feb 2019
  • 1 minute to read
  • Contributors

Configuration

Custom Instrumentation allows you to track classes and functions not natively supported in our PHP Profiler. Include a stackify.json file in your DOCUMENT_ROOT directory.

Example:

{
  "instrumentation": [
    {
      "class": "SampleClass1",
      "method": "execute"
    },
    {
      "class": "SampleClass2",
      "method": "index"
    }
  ]
}

Tracked Functions

Tracked Functions allows you tracked a specific method call across requests, data will show up in your application dashboard under the Tracked Functions tab.

Example:

{
  "instrumentation": [
    {
      "class": "SampleClass1",
      "method": "execute",
      "trackedFunction": true,
      "trackedFunctionName": "{{ClassName}}.{{MethodName}}"
    },
    {
      "class": "SampleClass2",
      "method": "index",
      "trackedFunction": true,
      "trackedFunctionName": "{{ClassName}}.{{MethodName}}"
    }
  ]
}
Was this article helpful?