stackdriver_trace_span.c
/* Add a label to the trace span struct */
Add a label to the trace span struct
Add a label to the trace span struct
int stackdriver_trace_span_add_label(stackdriver_trace_span_t *span,
                                     zend_string *k, zend_string *v)
{
    zval zv;
    ZVAL_STRING(&zv, ZSTR_VAL(v));
    if (zend_hash_update(span->labels, zend_string_copy(k), &zv) == NULL) {
        return FAILURE;
    } else {
        return SUCCESS;
    }
}
int stackdriver_trace_span_add_label ( stackdriver_trace_span_t * span , zend_string * k , zend_string * v ) { zval zv ; ZVAL_STRING ( & zv , ZSTR_VAL ( v ) ) ; if ( zend_hash_update ( span -> labels , zend_string_copy ( k ) , & zv ) == NULL ) { return FAILURE ; } else { return SUCCESS ; } }
Add a label to the trace span struct
Add a label to the trace span struct
/* put the string value into a zval and save it in the HashTable */