Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"bindings/binding.cc",
"bindings/map-get.cc",
"bindings/allocation-profile.cc",
"bindings/allocation-profile-node.cc"
"bindings/allocation-profile-node.cc",
"bindings/otel-thread-ctx.cc"
],
"include_dirs": [
"bindings",
Expand All @@ -46,7 +47,8 @@
"bindings/translate-time-profile.cc",
"bindings/test/binding.cc",
"bindings/allocation-profile.cc",
"bindings/allocation-profile-node.cc"
"bindings/allocation-profile-node.cc",
"bindings/otel-thread-ctx.cc"
],
"include_dirs": [
"bindings",
Expand Down Expand Up @@ -81,6 +83,15 @@
["-Wno-deprecated-declarations"],
"cflags_cc!": ["-std=gnu++14", "-std=gnu++1y", "-std=gnu++20" ],
"cflags_cc": ["-std=gnu++2a"],
"conditions": [
# -mtls-dialect=gnu2 forces TLSDESC on x86_64 so the
# otel_thread_ctx_nodejs_v1 symbol is reachable per the
# OTEP-4947 spec. On arm64 TLSDESC is the only dynamic
# model, so no flag is needed there.
['target_arch == "x64"', {
"cflags": ["-mtls-dialect=gnu2"],
}],
],
}
],
["OS == 'mac'",
Expand Down
2 changes: 2 additions & 0 deletions bindings/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <v8.h>

#include "allocation-profile-node.hh"
#include "otel-thread-ctx.hh"
#include "profilers/heap.hh"
#include "profilers/wall.hh"
#include "translate-time-profile.hh"
Expand Down Expand Up @@ -53,5 +54,6 @@ NODE_MODULE_INIT(/* exports, module, context */) {
dd::TimeProfileNodeView::Init(exports);
dd::HeapProfiler::Init(exports);
dd::WallProfiler::Init(exports);
dd::OtelThreadCtx::Init(exports);
Nan::SetMethod(exports, "getNativeThreadId", GetNativeThreadId);
}
Loading
Loading