未验证 提交 03dc42bb 编写于 作者: 何延龙 提交者: GitHub

Support v7 (#222)

上级 b6b70ec5
......@@ -873,7 +873,7 @@ void sky_curl_exec_handler(INTERNAL_FUNCTION_PARAMETERS)
if (SKYWALKING_G(version) == 5) { // skywalking 5.x
spprintf(&peer, 0, "%s://%s:%d", php_url_scheme, php_url_host, peer_port);
sw = generate_sw3(Z_LVAL_P(span_id) + 1, peer, operation_name);
} else if (SKYWALKING_G(version) == 6) { // skywalking 6.x
} else if (SKYWALKING_G(version) == 6 || SKYWALKING_G(version) == 7) { // skywalking 6.x
spprintf(&peer, 0, "%s:%d", php_url_host, peer_port);
sw = generate_sw6(Z_LVAL_P(span_id) + 1, peer, operation_name);
} else if (SKYWALKING_G(version) == 8) {
......@@ -1349,7 +1349,7 @@ static void generate_context() {
efree(uri);
}
}
} else if (SKYWALKING_G(version) == 6) {
} else if (SKYWALKING_G(version) == 6 || SKYWALKING_G(version) == 7) {
sw = zend_hash_str_find(Z_ARRVAL_P(carrier), "HTTP_SW6", sizeof("HTTP_SW6") - 1);
if (sw != NULL && Z_TYPE_P(sw) == IS_STRING && Z_STRLEN_P(sw) > 10) {
add_assoc_string(&SKYWALKING_G(context), "sw6", Z_STRVAL_P(sw));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册