Skip to content

Commit 08fb149

Browse files
committed
feat: FFI StringId constants
1 parent 4b986a3 commit 08fb149

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

datadog-profiling-ffi/src/profiles/profiling_dictionary.rs

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,39 @@ use datadog_profiling::profiles::datatypes::{
1212
use datadog_profiling::profiles::ProfileError;
1313
use ddcommon_ffi::CharSlice;
1414

15-
/// A StringId that represents the empty string. This is always available in
16-
/// every string set and can be used without needing to insert an empty string.
15+
/// A StringId that represents the empty string.
16+
/// This is always available in every string set and can be used without
17+
/// needing to insert it into a string set.
1718
#[no_mangle]
1819
pub static DDOG_PROF_STRINGID_EMPTY: StringId = StringId::EMPTY;
1920

21+
/// A StringId that represents the string "end_timestamp_ns".
22+
/// This is always available in every string set and can be used without
23+
/// needing to insert it into a string set.
24+
#[no_mangle]
25+
pub static DDOG_PROF_STRINGID_END_TIMESTAMP_NS: StringId =
26+
StringId::END_TIMESTAMP_NS;
27+
28+
/// A StringId that represents the string "local root span id".
29+
/// This is always available in every string set and can be used without
30+
/// needing to insert it into a string set.
31+
#[no_mangle]
32+
pub static DDOG_PROF_STRINGID_LOCAL_ROOT_SPAN_ID: StringId =
33+
StringId::LOCAL_ROOT_SPAN_ID;
34+
35+
/// A StringId that represents the string "trace endpoint".
36+
/// This is always available in every string set and can be used without
37+
/// needing to insert it into a string set.
38+
#[no_mangle]
39+
pub static DDOG_PROF_STRINGID_TRACE_ENDPOINT: StringId =
40+
StringId::TRACE_ENDPOINT;
41+
42+
/// A StringId that represents the string "span id".
43+
/// This is always available in every string set and can be used without
44+
/// needing to insert it into a string set.
45+
#[no_mangle]
46+
pub static DDOG_PROF_STRINGID_SPAN_ID: StringId = StringId::SPAN_ID;
47+
2048
/// Allocates a new `ProfilesDictionary` and writes a handle to it in `handle`.
2149
///
2250
/// # Safety

0 commit comments

Comments
 (0)