Skip to content

Commit

Permalink
Merge pull request #79 from DataDog/rgs/context-lookup-counters
Browse files Browse the repository at this point in the history
counters for missing context
  • Loading branch information
richardstartin authored Mar 8, 2024
2 parents ccaa5c9 + d00f993 commit 43ef0c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ddprof-lib/src/main/cpp/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Context& Contexts::get(int tid) {
if ((context.spanId ^ context.rootSpanId) == context.checksum) {
return context;
}
Counters::increment(CounterId::CONTEXT_CHECKSUM_REJECT_GETS);
} else {
Counters::increment(CounterId::CONTEXT_NULL_PAGE_GETS);
}
} else {
Counters::increment(CounterId::CONTEXT_BOUNDS_MISS_GETS);
Expand Down
2 changes: 2 additions & 0 deletions ddprof-lib/src/main/cpp/counters.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
X(CONTEXT_STORAGE_PAGES, "context_storage_pages") \
X(CONTEXT_BOUNDS_MISS_INITS, "context_bounds_miss_inits") \
X(CONTEXT_BOUNDS_MISS_GETS, "context_bounds_miss_gets") \
X(CONTEXT_CHECKSUM_REJECT_GETS, "context_checksum_reject_gets") \
X(CONTEXT_NULL_PAGE_GETS, "context_null_page_gets") \
X(CALLTRACE_STORAGE_BYTES, "calltrace_storage_bytes") \
X(CALLTRACE_STORAGE_TRACES, "calltrace_storage_traces") \
X(LINEAR_ALLOCATOR_BYTES, "linear_allocator_bytes") \
Expand Down

0 comments on commit 43ef0c5

Please sign in to comment.