Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Doesn't install on Node.js 16 (macOS only) #14

Open
spencerwilson opened this issue Jun 12, 2021 · 2 comments
Open

Doesn't install on Node.js 16 (macOS only) #14

spencerwilson opened this issue Jun 12, 2021 · 2 comments

Comments

@spencerwilson
Copy link

spencerwilson commented Jun 12, 2021

Describe the bug
On 7682aab aka v0.2.0, npm install on Node.js 16+ (the "Current" major version; will become "Active" LTS on 2021-10-26) fails during installation of the transitive dependency dd-trace:

  CXX(target) Release/obj.target/metrics/packages/dd-trace/src/native/metrics/Collector.o
In file included from ../packages/dd-trace/src/native/metrics/Collector.cpp:1:
In file included from ../packages/dd-trace/src/native/metrics/Collector.hpp:6:
In file included from ../packages/dd-trace/src/native/metrics/Object.hpp:3:
In file included from ../../nan/nan.h:56:
In file included from /Users/ssw/Library/Caches/node-gyp/16.0.0/include/node/node.h:63:
In file included from /Users/ssw/Library/Caches/node-gyp/16.0.0/include/node/v8.h:30:
/Users/ssw/Library/Caches/node-gyp/16.0.0/include/node/v8-internal.h:452:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
            !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                ~~~~~^~~~~~~~~~~
                                     remove_cv
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
                                                 ^
1 error generated.
make: *** [Release/obj.target/metrics/packages/dd-trace/src/native/metrics/Collector.o] Error 1

To Reproduce
Steps to reproduce the behavior:

  1. npm install using Node.js 16.x on any platform

Expected behavior
Installs without error

Additional context

I confirmed that the package can successfully be installed after applying

diff --git a/package.json b/package.json
index 53323be..7d567f1 100644
--- a/package.json
+++ b/package.json
@@ -71,6 +71,6 @@
     "@opentelemetry/core": "^0.16.0",
     "@opentelemetry/resources": "^0.16.0",
     "@opentelemetry/tracing": "^0.16.0",
-    "dd-trace": "^0.21.0"
+    "dd-trace": "^0.35.0"
   }
 }

but under that patch, 35 of the 45 non-skiped tests fail:

  35 passing (242ms)
  2 pending
  10 failing

For more info on the dd-trace bug, see DataDog/dd-trace-js#1388.

@spencerwilson spencerwilson changed the title Doesn't install on Node.js 16 Doesn't install on Node.js 16 (macOS only) Jun 12, 2021
@spencerwilson
Copy link
Author

spencerwilson commented Jun 12, 2021

Workaround: Rather than sending trace data from my Node.js process directly to Datadog, I'm probably gonna export it via @opentelemetry/exporter-collector-grpc to an OpenTelemetry Collector configured to run the Datadog exporter. I also notice that this'll happily put us in compliance with the guidance added in DataDog/documentation#9824:

Datadog recommends you use the OpenTelemetry Collector Datadog exporter in conjunction with OpenTelemetry tracing clients [, with the language-specific exporters as a secondary option]

P.S. Thanks @ericmustin for your effort to bring OTel support to Datadog! As a customer, I appreciate it.

@ericmustin
Copy link
Contributor

@spencerwilson 👋 hope all is well. apologies for the state of affairs of this repo, it is indeed a bit out of date with latest node and also just in general with latest opentelemetry-js. For context, we're working on adding OTLP Support directly to the datadog-agent, which would preclude the need for these helper libs in every language. In the meantime the suggested setup is to use the opentelemetry-collector (contrib flavor) and the datadogexporter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants