Skip to content

Commit

Permalink
v0.5.1 http.curl.response
Browse files Browse the repository at this point in the history
  • Loading branch information
kilingzhang committed Aug 30, 2022
1 parent ceeb9fc commit 54b9aca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion php_opentelemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ OPENTELEMETRY_BEGIN_EXTERN_C()
extern zend_module_entry opentelemetry_module_entry;
#define phpext_opentelemetry_ptr &opentelemetry_module_entry

#define PHP_OPENTELEMETRY_VERSION "0.5.0" /* Replace with version number for your extension */
#define PHP_OPENTELEMETRY_VERSION "0.5.1" /* Replace with version number for your extension */
#define DEFAULT_ETH_INF "eth0"
#define PHP_OPENTELEMETRY_SERVICE_NAME "opentelemetry"
#define PHP_OPENTELEMETRY_SERVICE_NAME_KEY "SERVICE_NAME"
Expand Down
2 changes: 1 addition & 1 deletion src/zend_hook_curl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ void opentelemetry_curl_exec_handler(INTERNAL_FUNCTION_PARAMETERS) {
return;
}

debug("opentelemetry_curl_exec_handler");
zval *zid;

#if PHP_VERSION_ID >= 80000
Expand Down Expand Up @@ -165,6 +164,7 @@ void opentelemetry_curl_exec_handler(INTERNAL_FUNCTION_PARAMETERS) {
response_primary_ip = zend_hash_str_find(Z_ARRVAL(url_response), ZEND_STRL("primary_ip"));
set_string_attribute(span->add_attributes(), "net.peer.ip", Z_STR_P(response_primary_ip)->val);

set_string_attribute(span->add_attributes(), "http.curl.response", opentelemetry_json_encode(&url_response));
// 总共的传输时间
response_total_time = zend_hash_str_find(Z_ARRVAL(url_response), ZEND_STRL("total_time"));
set_double_attribute(span->add_attributes(), "http.response_total_time", Z_DVAL_P(response_total_time));
Expand Down

0 comments on commit 54b9aca

Please sign in to comment.