Skip to content

Debug option ELASTIC_OTEL_DEBUG_PHP_HOOKS_ENABLED to log data from all instrumented hooks#155

Merged
intuibase merged 1 commit intoelastic:mainfrom
intuibase:debug_php_hooks
Feb 3, 2025
Merged

Debug option ELASTIC_OTEL_DEBUG_PHP_HOOKS_ENABLED to log data from all instrumented hooks#155
intuibase merged 1 commit intoelastic:mainfrom
intuibase:debug_php_hooks

Conversation

@intuibase
Copy link
Copy Markdown
Contributor

Example output:

[2025-01-31 17:04:54.291979 UTC] [250784/250784] [DEBUG   ] PRE HOOK  0 'curl_setopt' pre-hook data: array (
  0 => NULL,
  1 => 
  array (
    0 => 
    \CurlHandle::__set_state(array(
    )),
    1 => 10023,
    2 => 
    array (
      0 => 'traceparent: 00-6109a02b7848f871a71c4691f62c2ca6-8c53671ee44369e5-01',
    ),
  ),
  2 => NULL,
  3 => 'curl_setopt',
  4 => NULL,
  5 => NULL,
)
[2025-01-31 17:04:54.291993 UTC] [250784/250784] [DEBUG   ] POST HOOK  'curl_setopt' post-hook data: array (
  0 => NULL,
  1 => 
  array (
    0 => 
    \CurlHandle::__set_state(array(
    )),
    1 => 10023,
    2 => 
    array (
      0 => 'traceparent: 00-6109a02b7848f871a71c4691f62c2ca6-8c53671ee44369e5-01',
    ),
  ),
  2 => true,
  3 => NULL,
  4 => NULL,
  5 => 'curl_setopt',
  6 => NULL,
  7 => NULL,
)

@SergeyKleyman Maybe we should introduce another option to print also debug_backtrace with those lines?

@intuibase intuibase self-assigned this Jan 31, 2025
@intuibase intuibase merged commit 9fbc639 into elastic:main Feb 3, 2025
@intuibase intuibase deleted the debug_php_hooks branch February 3, 2025 12:08
@intuibase intuibase mentioned this pull request Feb 3, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants