提交 654f5df3 编写于 作者: G goerzh

add get_traceId function

上级 e0afed79
......@@ -84,14 +84,18 @@ PHP_INI_END()
/* }}} */
PHP_FUNCTION(get_traceId) {
zval *distributedTraceId = zend_hash_str_find(Z_ARRVAL(SKYWALKING_G(context)), "distributedTraceId", sizeof("distributedTraceId") - 1);
RETURN_STRING(Z_STRVAL_P(distributedTraceId));
}
/* {{{ skywalking_functions[]
*
* Every user visible function must have an entry in skywalking_functions[].
*/
const zend_function_entry skywalking_functions[] = {
/* For testing, remove later. */
PHP_FE(get_traceId, NULL)
PHP_FE_END /* Must be the last line in skywalking_functions[] */
};
/* }}} */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册