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

Merge pull request #56 from goerzh/fetch-traceid-func

Fetch traceid func
......@@ -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[] */
};
/* }}} */
......
......@@ -21,7 +21,7 @@ CPPFLAGS += `pkg-config --cflags protobuf grpc`
CXXFLAGS += -std=c++11
CXXFLAGS += -I.. -I../grpc
ifeq ($(SYSTEM),Darwin)
LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++`\
LDFLAGS += -Ldeps/boost/stage/lib -L/usr/local/lib `pkg-config --libs protobuf grpc++`\
-lgrpc++_reflection\
-ldl\
-lboost_regex
......@@ -36,11 +36,11 @@ GRPC_CPP_PLUGIN = grpc_cpp_plugin
GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)`
all: system-check report_client
all: system-check boost report_client
#boost:
# cd deps/boost && ./bootstrap.sh && \
# ./b2 stage --with-regex link=static runtime-link=shared threading=multi
boost:
cd deps/boost && ./bootstrap.sh && \
./b2 stage --with-regex link=static runtime-link=shared threading=multi
OBJS = ../grpc/language-agent-v2/.libs/trace.o ../grpc/language-agent-v2/.libs/trace-grpc.o ../grpc/register/.libs/InstancePing.o \
../grpc/register/.libs/InstancePing-grpc.o ../grpc/common/.libs/common.o ../grpc/common/.libs/common-grpc.o \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册