Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 11f6a2d

Browse files
authored
Add php_info() section for OpenCensus (#42)
1 parent c0ec5fb commit 11f6a2d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

ext/opencensus_trace.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ static zend_function_entry opencensus_functions[] = {
8383
PHP_FE_END
8484
};
8585

86+
PHP_MINFO_FUNCTION(opencensus)
87+
{
88+
php_info_print_table_start();
89+
php_info_print_table_row(2, "OpenCensus support", "enabled");
90+
php_info_print_table_row(2, "OpenCensus module version", PHP_OPENCENSUS_VERSION);
91+
php_info_print_table_end();
92+
DISPLAY_INI_ENTRIES();
93+
}
94+
8695
/* Registers the lifecycle hooks for this extension */
8796
zend_module_entry opencensus_module_entry = {
8897
STANDARD_MODULE_HEADER,
@@ -92,7 +101,7 @@ zend_module_entry opencensus_module_entry = {
92101
PHP_MSHUTDOWN(opencensus),
93102
PHP_RINIT(opencensus),
94103
PHP_RSHUTDOWN(opencensus),
95-
NULL, /* name of the MINFO function or NULL if not applicable */
104+
PHP_MINFO(opencensus),
96105
PHP_OPENCENSUS_VERSION,
97106
STANDARD_MODULE_PROPERTIES
98107
};

0 commit comments

Comments
 (0)