Home
last modified time | relevance | path

Searched refs:span (Results 1 - 25 of 53) sorted by relevance

123

/Couchbase_C_Client_v3.0/tests/iotests/
H A Dmock-unit-test.cc85 void MockUnitTest::assert_kv_span(const std::shared_ptr<TestSpan> &span, const std::string &expectedName, in assert_kv_span() argument
89 ASSERT_EQ(expectedName, span->name); in assert_kv_span()
90 ASSERT_EQ("couchbase", span->str_tags["db.system"]); in assert_kv_span()
91 ASSERT_TRUE(span->int_tags.find("db.couchbase.server_duration") != span->int_tags.end()); in assert_kv_span()
92 ASSERT_EQ(bucket, span->str_tags["db.name"]); in assert_kv_span()
93 ASSERT_EQ(assertions.scope, span->str_tags["db.couchbase.scope"]); in assert_kv_span()
94 ASSERT_EQ(assertions.collection, span->str_tags["db.couchbase.collection"]); in assert_kv_span()
95 ASSERT_EQ("kv", span->str_tags["db.couchbase.service"]); in assert_kv_span()
96 ASSERT_EQ(expectedName, span in assert_kv_span()
113 assert_http_span(const std::shared_ptr<TestSpan> &span, const std::string &expectedName, const HTTPSpanAssertions &assertions) assert_http_span() argument
[all...]
H A Dmock-unit-test.h76 static void assert_kv_span(const std::shared_ptr<TestSpan> &span, const std::string &expectedName,
78 static void assert_http_span(const std::shared_ptr<TestSpan> &span, const std::string &expectedName,
/Couchbase_C_Client_v3.0/src/tracing/
H A Dspan.cc68 void lcbtrace_span_finish(lcbtrace_SPAN *span, uint64_t now) in lcbtrace_span_finish() argument
70 if (!span) { in lcbtrace_span_finish()
74 span->finish(now); in lcbtrace_span_finish()
75 delete span; in lcbtrace_span_finish()
79 int lcbtrace_span_should_finish(lcbtrace_SPAN *span) in lcbtrace_span_should_finish() argument
81 if (!span) { in lcbtrace_span_should_finish()
85 return span->should_finish(); in lcbtrace_span_should_finish()
89 void lcbtrace_span_add_tag_str_nocopy(lcbtrace_SPAN *span, const char *name, const char *value) in lcbtrace_span_add_tag_str_nocopy() argument
91 if (!span || name == nullptr || value == nullptr) { in lcbtrace_span_add_tag_str_nocopy()
94 span in lcbtrace_span_add_tag_str_nocopy()
98 lcbtrace_span_add_tag_str(lcbtrace_SPAN *span, const char *name, const char *value) lcbtrace_span_add_tag_str() argument
107 lcbtrace_span_add_tag_uint64(lcbtrace_SPAN *span, const char *name, uint64_t value) lcbtrace_span_add_tag_uint64() argument
116 lcbtrace_span_add_tag_double(lcbtrace_SPAN *span, const char *name, double value) lcbtrace_span_add_tag_double() argument
125 lcbtrace_span_add_tag_bool(lcbtrace_SPAN *span, const char *name, int value) lcbtrace_span_add_tag_bool() argument
134 lcbtrace_span_add_system_tags(lcbtrace_SPAN *span, const lcb_settings *settings, lcbtrace_THRESHOLDOPTS svc) lcbtrace_span_add_system_tags() argument
156 lcbtrace_span_get_parent(lcbtrace_SPAN *span) lcbtrace_span_get_parent() argument
165 lcbtrace_span_get_start_ts(lcbtrace_SPAN *span) lcbtrace_span_get_start_ts() argument
174 lcbtrace_span_get_finish_ts(lcbtrace_SPAN *span) lcbtrace_span_get_finish_ts() argument
183 lcbtrace_span_is_orphaned(lcbtrace_SPAN *span) lcbtrace_span_is_orphaned() argument
189 lcbtrace_span_set_orphaned(lcbtrace_SPAN *span, int val) lcbtrace_span_set_orphaned() argument
201 lcbtrace_span_get_span_id(lcbtrace_SPAN *span) lcbtrace_span_get_span_id() argument
210 lcbtrace_span_get_operation(lcbtrace_SPAN *span) lcbtrace_span_get_operation() argument
219 lcbtrace_span_get_trace_id(lcbtrace_SPAN *span) lcbtrace_span_get_trace_id() argument
231 lcbtrace_span_get_tag_str(lcbtrace_SPAN *span, const char *name, char **value, size_t *nvalue) lcbtrace_span_get_tag_str() argument
254 lcbtrace_span_get_tag_uint64(lcbtrace_SPAN *span, const char *name, uint64_t *value) lcbtrace_span_get_tag_uint64() argument
276 lcbtrace_span_get_tag_double(lcbtrace_SPAN *span, const char *name, double *value) lcbtrace_span_get_tag_double() argument
298 lcbtrace_span_get_tag_bool(lcbtrace_SPAN *span, const char *name, int *value) lcbtrace_span_get_tag_bool() argument
320 lcbtrace_span_has_tag(lcbtrace_SPAN *span, const char *name) lcbtrace_span_has_tag() argument
337 lcbtrace_span_get_service(lcbtrace_SPAN *span, lcbtrace_SERVICE *svc) lcbtrace_span_get_service() argument
346 lcbtrace_span_set_service(lcbtrace_SPAN *span, lcbtrace_SERVICE svc) lcbtrace_span_set_service() argument
355 lcbtrace_span_set_is_dispatch(lcbtrace_SPAN *span, int dispatch) lcbtrace_span_set_is_dispatch() argument
364 lcbtrace_span_set_is_outer(lcbtrace_SPAN *span, int outer) lcbtrace_span_set_is_outer() argument
373 lcbtrace_span_set_is_encode(lcbtrace_SPAN *span, int encode) lcbtrace_span_set_is_encode() argument
382 lcbtrace_span_get_is_dispatch(lcbtrace_SPAN *span, int *dispatch) lcbtrace_span_get_is_dispatch() argument
391 lcbtrace_span_get_is_outer(lcbtrace_SPAN *span, int *outer) lcbtrace_span_get_is_outer() argument
400 lcbtrace_span_get_is_encode(lcbtrace_SPAN *span, int *encode) lcbtrace_span_get_is_encode() argument
[all...]
H A Dthreshold_logging_tracer.cc43 static void tlt_report(lcbtrace_TRACER *wrapper, lcbtrace_SPAN *span) in tlt_report() argument
50 if (span->is_dispatch()) { in tlt_report()
51 span->find_outer_or_this()->increment_dispatch(span->duration()); in tlt_report()
53 if (span->is_encode()) { in tlt_report()
54 span->find_outer_or_this()->m_encode = span->duration(); in tlt_report()
56 if (span->is_outer()) { in tlt_report()
57 if (span->m_orphaned) { in tlt_report()
58 tracer->add_orphan(span); in tlt_report()
80 convert(lcbtrace_SPAN *span) convert() argument
125 add_orphan(lcbtrace_SPAN *span) add_orphan() argument
130 check_threshold(lcbtrace_SPAN *span) check_threshold() argument
[all...]
H A Dtracing-internal.h32 void lcbtrace_span_add_system_tags(lcbtrace_SPAN *span, const lcb_settings *settings, lcbtrace_THRESHOLDOPTS svc);
34 void lcbtrace_span_add_tag_str_nocopy(lcbtrace_SPAN *span, const char *name, const char *value);
35 void lcbtrace_span_add_host_and_port(lcbtrace_SPAN *span, lcbio_CONNINFO *info);
149 QueueEntry convert(lcbtrace_SPAN *span);
155 void add_orphan(lcbtrace_SPAN *span);
156 void check_threshold(lcbtrace_SPAN *span);
173 lcbtrace_SPAN *span; in start_kv_span() local
176 span = parent_span; in start_kv_span()
177 span->should_finish(false); in start_kv_span()
181 ref.span in start_kv_span()
205 lcbtrace_SPAN *span = start_kv_span(settings, packet, cmd); start_kv_span_with_durability() local
218 lcbtrace_SPAN *span; start_http_span() local
245 lcbtrace_SPAN *span = start_http_span(settings, cmd); start_http_span_with_statement() local
253 finish_http_span(lcbtrace_SPAN *span, const COMMAND *cmd) finish_http_span() argument
[all...]
H A Dtracer.cc63 other = ref->span; in lcbtrace_span_start()
95 void lcbtrace_span_add_host_and_port(lcbtrace_SPAN *span, lcbio_CONNINFO *info) in lcbtrace_span_add_host_and_port() argument
97 if (span) { in lcbtrace_span_add_host_and_port()
98 lcbtrace_span_add_tag_str_nocopy(span, LCBTRACE_TAG_LOCAL_ADDRESS, info->ep_local.host); in lcbtrace_span_add_host_and_port()
99 lcbtrace_span_add_tag_str_nocopy(span, LCBTRACE_TAG_LOCAL_PORT, info->ep_local.port); in lcbtrace_span_add_host_and_port()
100 lcbtrace_span_add_tag_str_nocopy(span, LCBTRACE_TAG_PEER_ADDRESS, info->ep_remote.host); in lcbtrace_span_add_host_and_port()
101 lcbtrace_span_add_tag_str_nocopy(span, LCBTRACE_TAG_PEER_PORT, info->ep_remote.port); in lcbtrace_span_add_host_and_port()
/Couchbase_C_Client_v3.0/include/libcouchbase/
H A Dtracing.h58 * Service the span is associated with. Used in threshold logging tracer
80 void (*report)(struct lcbtrace_TRACER *tracer, lcbtrace_SPAN *span); /**< optional reporter function */
84 void (*end_span)(void *span);
85 void (*destroy_span)(void *span);
86 void (*add_tag_string)(void *span, const char *name, const char *value, size_t value_len);
87 void (*add_tag_uint64)(void *span, const char *name, uint64_t value);
139 lcbtrace_SPAN *span; member
156 * Start span.
161 * @param ref reference to the other span, or NULL
169 * Wrap external span
[all...]
H A Dcouchbase.h702 LIBCOUCHBASE_API lcb_STATUS lcb_cmdget_parent_span(lcb_CMDGET *cmd, lcbtrace_SPAN *span);
815 LIBCOUCHBASE_API lcb_STATUS lcb_cmdgetreplica_parent_span(lcb_CMDGETREPLICA *cmd, lcbtrace_SPAN *span);
847 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_parent_span(lcb_CMDEXISTS *cmd, lcbtrace_SPAN *span);
994 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_parent_span(lcb_CMDSTORE *cmd, lcbtrace_SPAN *span);
1115 LIBCOUCHBASE_API lcb_STATUS lcb_cmdremove_parent_span(lcb_CMDREMOVE *cmd, lcbtrace_SPAN *span);
1209 LIBCOUCHBASE_API lcb_STATUS lcb_cmdcounter_parent_span(lcb_CMDCOUNTER *cmd, lcbtrace_SPAN *span);
1300 LIBCOUCHBASE_API lcb_STATUS lcb_cmdunlock_parent_span(lcb_CMDUNLOCK *cmd, lcbtrace_SPAN *span);
1375 LIBCOUCHBASE_API lcb_STATUS lcb_cmdtouch_parent_span(lcb_CMDTOUCH *cmd, lcbtrace_SPAN *span);
1461 LIBCOUCHBASE_API lcb_STATUS lcb_cmdping_parent_span(lcb_CMDPING *cmd, lcbtrace_SPAN *span);
1688 LIBCOUCHBASE_API lcb_STATUS lcb_cmdhttp_parent_span(lcb_CMDHTTP *cmd, lcbtrace_SPAN *span);
[all...]
/Couchbase_C_Client_v3.0/src/netbuf/
H A Dnetbuf.h49 * into the span/cursor/flush architecture.
63 * own structure and then re-create them as needed. The span structure is 16
81 * Creates a span from a buffer _not_ owned by netbufs.
82 * @param span the span to initialize
86 #define CREATE_STANDALONE_SPAN(span, buf, len) \
87 (span)->parent = (nb_MBLOCK *)(void *)buf; \
88 (span)->offset = NETBUF_INVALID_OFFSET; \
89 (span)->size = len;
139 * Quick way to get the span fro
[all...]
H A Dnetbuf.c139 * Find a new block for the given span and initialize it for a reserved size
140 * correlating to the span.
144 static int reserve_empty_block(nb_MBPOOL *pool, nb_SPAN *span) in reserve_empty_block() argument
148 if ((block = find_free_block(pool, span->size)) == NULL) { in reserve_empty_block()
149 block = alloc_new_block(pool, span->size); in reserve_empty_block()
156 span->parent = block; in reserve_empty_block()
157 span->offset = 0; in reserve_empty_block()
159 block->wrap = span->size; in reserve_empty_block()
160 block->cursor = span->size; in reserve_empty_block()
170 * span
174 reserve_active_block(nb_MBLOCK *block, nb_SPAN *span) reserve_active_block() argument
208 mblock_reserve_data(nb_MBPOOL *pool, nb_SPAN *span) mblock_reserve_data() argument
242 ooo_queue_dealoc(nb_MGR *mgr, nb_MBLOCK *block, nb_SPAN *span) ooo_queue_dealoc() argument
335 nb_SPAN span; mblock_release_data() local
484 netbuf_mblock_reserve(nb_MGR *mgr, nb_SPAN *span) netbuf_mblock_reserve() argument
519 nb_SPAN span = {NULL, 0, 0}; get_sendqe() local
553 netbuf_enqueue_span(nb_MGR *mgr, nb_SPAN *span, const void *parent) netbuf_enqueue_span() argument
682 netbuf_mblock_release(nb_MGR *mgr, nb_SPAN *span) netbuf_mblock_release() argument
[all...]
/Couchbase_C_Client_v3.0/example/tracing/
H A Dotel_tracing.cc30 lcbtrace_SPAN *span; in store_callback() local
31 lcb_respstore_cookie(resp, (void **)&span); in store_callback()
32 lcbtrace_REF ref{LCBTRACE_REF_CHILD_OF, span}; in store_callback()
36 lcbtrace_span_finish(span, LCBTRACE_NOW); in store_callback()
48 lcbtrace_SPAN *span; in row_callback() local
49 lcb_respquery_cookie(resp, (void **)&span); in row_callback()
50 lcbtrace_REF ref{LCBTRACE_REF_CHILD_OF, span}; in row_callback()
54 lcbtrace_span_finish(span, LCBTRACE_NOW); in row_callback()
64 nostd::shared_ptr<opentelemetry::trace::Span> span; member
77 opt.parent = static_cast<otel_span *>(parent)->span in start_span()
83 end_span(void *span) end_span() argument
88 destroy_span(void *span) destroy_span() argument
93 add_tag_string(void *span, const char *name, const char *value, size_t value_len) add_tag_string() argument
101 add_tag_uint64(void *span, const char *name, uint64_t value) add_tag_uint64() argument
[all...]
H A Dtracing.c81 void zipkin_report(lcbtrace_TRACER *tracer, lcbtrace_SPAN *span) in zipkin_report() argument
106 cJSON_AddItemToObject(json, "name", cJSON_CreateString(lcbtrace_span_get_operation(span))); in zipkin_report()
107 snprintf(buf, nbuf, "%" PRIx64, lcbtrace_span_get_span_id(span)); in zipkin_report()
109 snprintf(buf, nbuf, "%" PRIx64, lcbtrace_span_get_trace_id(span)); in zipkin_report()
111 parent = lcbtrace_span_get_parent(span); in zipkin_report()
116 start = lcbtrace_span_get_start_ts(span); in zipkin_report()
118 cJSON_AddItemToObject(json, "duration", cJSON_CreateNumber(lcbtrace_span_get_finish_ts(span) - start)); in zipkin_report()
124 if (lcbtrace_span_get_tag_str(span, LCBTRACE_TAG_SYSTEM, &buf, &nbuf) == LCB_SUCCESS) { in zipkin_report()
134 if (lcbtrace_span_get_tag_uint64(span, LCBTRACE_TAG_PEER_LATENCY, &latency) == LCB_SUCCESS) { in zipkin_report()
137 if (lcbtrace_span_get_tag_uint64(span, LCBTRACE_TAG_OPERATION_I in zipkin_report()
352 lcbtrace_SPAN *span = NULL; main() local
[all...]
H A Dviews.c81 void zipkin_report(lcbtrace_TRACER *tracer, lcbtrace_SPAN *span) in zipkin_report() argument
106 cJSON_AddItemToObject(json, "name", cJSON_CreateString(lcbtrace_span_get_operation(span))); in zipkin_report()
107 snprintf(buf, nbuf, "%" PRIx64, lcbtrace_span_get_span_id(span)); in zipkin_report()
109 snprintf(buf, nbuf, "%" PRIx64, lcbtrace_span_get_trace_id(span)); in zipkin_report()
111 parent = lcbtrace_span_get_parent(span); in zipkin_report()
116 start = lcbtrace_span_get_start_ts(span); in zipkin_report()
118 cJSON_AddItemToObject(json, "duration", cJSON_CreateNumber(lcbtrace_span_get_finish_ts(span) - start)); in zipkin_report()
124 if (lcbtrace_span_get_tag_str(span, LCBTRACE_TAG_SYSTEM, &buf, &nbuf) == LCB_SUCCESS) { in zipkin_report()
134 if (lcbtrace_span_get_tag_uint64(span, LCBTRACE_TAG_PEER_LATENCY, &latency) == LCB_SUCCESS) { in zipkin_report()
137 if (lcbtrace_span_get_tag_uint64(span, LCBTRACE_TAG_OPERATION_I in zipkin_report()
340 lcbtrace_SPAN *span = NULL; main() local
[all...]
/Couchbase_C_Client_v3.0/tests/basic/
H A Dt_netbuf.cc44 nb_SPAN span; in TEST_F() local
45 span.size = 500; in TEST_F()
46 int rv = netbuf_mblock_reserve(&mgr, &span); in TEST_F()
49 netbuf_mblock_release(&mgr, &span); in TEST_F()
82 nb_SPAN *span = spans_big + ii; in TEST_F() local
83 span->size = BIG_BUF_SIZE; in TEST_F()
84 rv = netbuf_mblock_reserve(&mgr, span); in TEST_F()
86 memset(SPAN_BUFFER(span), filler, span->size); in TEST_F()
90 nb_SPAN *span in TEST_F() local
128 nb_SPAN span; TEST_F() local
[all...]
/Couchbase_C_Client_v3.0/src/operations/
H A Dobserve.cc39 void MCTX_setspan(lcbtrace_SPAN *span) override;
50 lcbtrace_SPAN *span; member
107 if (oc->remaining == 0 && oc->span) { in handle_observe_callback()
108 lcbtrace_span_finish(oc->span, LCBTRACE_NOW); in handle_observe_callback()
109 oc->span = nullptr; in handle_observe_callback()
147 span = span_; in MCTX_setspan()
283 ref.span = span; in MCTX_done()
284 MCREQ_PKT_RDATA(pkt)->span = in MCTX_done()
286 lcbtrace_span_add_tag_str(MCREQ_PKT_RDATA(pkt)->span, LCBTRACE_TAG_OPERATION_I in MCTX_done()
[all...]
H A Dstore.cc153 LIBCOUCHBASE_API lcb_STATUS lcb_cmdstore_parent_span(lcb_CMDSTORE *cmd, lcbtrace_SPAN *span) in lcb_cmdstore_parent_span() argument
155 return cmd->parent_span(span); in lcb_cmdstore_parent_span()
267 lcbtrace_SPAN *span = nullptr; in handle_dur_storecb() local
294 span = MCREQ_PKT_RDATA(pkt)->span; in handle_dur_storecb()
295 if (span) { in handle_dur_storecb()
296 mctx->setspan(mctx, span); in handle_dur_storecb()
500 rdata->span = lcb::trace::start_kv_span_with_durability(instance->settings, packet, cmd); in store_schedule()
H A Ddurability_internal.h257 void MCTX_setspan(lcbtrace_SPAN *span) override;
283 lcbtrace_SPAN *span; member
H A Ddurability.cc323 span = span_; in MCTX_setspan()
381 if (span) { in MCTX_fail()
382 lcbtrace_span_finish(span, LCBTRACE_NOW); in MCTX_fail()
383 span = NULL; in MCTX_fail()
395 is_durstore(false), cookie(NULL), ns_timeout(0), timer(NULL), instance(instance_), span(NULL) in Durset()
H A Dexists.cc86 LIBCOUCHBASE_API lcb_STATUS lcb_cmdexists_parent_span(lcb_CMDEXISTS *cmd, lcbtrace_SPAN *span) in lcb_cmdexists_parent_span() argument
88 return cmd->parent_span(span); in lcb_cmdexists_parent_span()
183 pkt->u_rdata.reqdata.span = lcb::trace::start_kv_span(instance->settings, pkt, cmd); in exists_schedule()
/Couchbase_C_Client_v3.0/src/
H A Dmctx-helper.h32 virtual void MCTX_setspan(lcbtrace_SPAN *span) = 0;
62 static void dispatch_mctx_setspan(lcb_MULTICMD_CTX *ctx, lcbtrace_SPAN *span) in dispatch_mctx_setspan() argument
64 static_cast<MultiCmdContext *>(ctx)->MCTX_setspan(span); in dispatch_mctx_setspan()
/Couchbase_C_Client_v3.0/src/mc/
H A Dmcreq.c101 * If the key is to be copied then just allocate the span size in mcreq_reserve_key()
170 /** It's still contiguous so make it a 'standalone' span */ in mcreq_reserve_value()
305 nb_SPAN span; in mcreq_allocate_packet() local
308 span.size = sizeof(*ret); in mcreq_allocate_packet()
310 rv = netbuf_mblock_reserve(&pipeline->reqpool, &span); in mcreq_allocate_packet()
315 ret = (void *)SPAN_MBUFFER_NC(&span); in mcreq_allocate_packet()
316 ret->alloc_parent = span.parent; in mcreq_allocate_packet()
320 ret->u_rdata.reqdata.span = NULL; in mcreq_allocate_packet()
327 nb_SPAN span; in mcreq_release_packet() local
342 span in mcreq_release_packet()
[all...]
H A Dforward.c25 static void span_from_first(mc_IOVCURSOR *cursor, unsigned size, nb_SPAN *span) in span_from_first() argument
29 CREATE_STANDALONE_SPAN(span, dummy.iov_base, dummy.iov_len); in span_from_first()
169 /* Copy the first 24 bytes into the header span */ in mc_forward_packet()
H A Dmcreq.h153 lcbtrace_SPAN *span; member
199 lcbtrace_SPAN *span; member
205 : cookie(cookie_), start(start_), dispatch(0), span(NULL), nsubreq(0), procs(&procs_) in mc_REQDATAEX()
/Couchbase_C_Client_v3.0/tests/socktests/
H A Dt_putex.cc96 nb_SPAN span; in append() local
97 CREATE_STANDALONE_SPAN(&span, wb->buf, wb->length); in append()
98 netbuf_enqueue_span(&mgr, &span, nullptr); in append()
/Couchbase_C_Client_v3.0/src/capi/
H A Dcmd_search.cc81 LIBCOUCHBASE_API lcb_STATUS lcb_cmdsearch_parent_span(lcb_CMDSEARCH *cmd, lcbtrace_SPAN *span) in lcb_cmdsearch_parent_span() argument
83 return cmd->parent_span(span); in lcb_cmdsearch_parent_span()

Completed in 69 milliseconds

123