Giter Club home page Giter Club logo

applicationinsights-node.js-native-metrics's Introduction

ApplicationInsights Node.js Native Metrics

Native Metrics Agent for the Application Insights Node.js SDK

Getting Started

Your app must be using the Application Insights Node.js SDK.

Once your app is using the Application Insights SDK, you can add native metrics capabilities by simply adding the native-metrics package to your app. No further configuration is required!

npm i --save applicationinsights-native-metrics

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Data Collection

As this SDK is designed to enable applications to perform data collection which is sent to the Microsoft collection endpoints the following is required to identify our privacy statement.

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

License

MIT

applicationinsights-node.js-native-metrics's People

Contributors

cfeltner avatar dependabot[bot] avatar hectorhdzg avatar markwolff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

applicationinsights-node.js-native-metrics's Issues

free() invalid pointer size

From time to time our integration tests fail with the following error:

corrupted double-linked list
Aborted (core dumped)

We managed to make this issue reproducible on demand. And after a long period of bisecting and trimming down, it disappeared when we removed the dependency on applicationinsights-native-metrics.

We're not sure to be able to create a simple repro case easily. Would there be another way to help you find out the root cause of this issue?

Still maintained?

I'd like to use this but the pre-build binaries available seem to be for old node versions, the build is pretty ropey in our CI env - needs 4gb of c++ libs on windows agents etc...

The outstanding pull request is needed but hasn't been merged...

So just questioning if this is still maintained?

Redis information no longer showing up in Azure Portal

We are using package versions....

"applicationinsights": "^2.7.0",
"applicationinsights-native-metrics": "^0.0.9",
"redis": "^4.6.7"

...and have lately noticed that redis telemetry is no longer showing up in in the portal....is there something we need to do to correct this?

Portal Image

I cannot install [email protected]

Hi all,

I ran npm install [email protected] and got this error:

npm install [email protected]

> [email protected] install C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v72-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v72-win32-x64-unknown.tar.gz
gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2012
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2019 (16.3.29424.173) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
gyp ERR! find VS - "Visual Studio C++ core features" missing
gyp ERR! find VS checking VS2019 (16.9.31129.286) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v142
gyp ERR! find VS - missing any Windows SDK
gyp ERR! find VS checking VS2017 (15.9.28307.423) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v141
gyp ERR! find VS - missing any Windows SDK
gyp ERR! find VS checking VS2017 (15.9.28307.423) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS valid versions for msvs_version:
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:310:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\joe\\AppData\\Roaming\\npm\\node_modules\\applicationinsights-native-metrics\\build\\Release\\native_metrics.node" "--module_name=native_metrics" "--module_path=C:\\Users\\joe\\AppData\\Roaming\\npm\\node_modules\\applicationinsights-native-metrics\\build\\Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" "--msvs_version=2012"
gyp ERR! cwd C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics\build\Release\native_metrics.node --module_name=native_metrics --module_path=C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --msvs_version=2012' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\joe\\AppData\\Roaming\\npm\\node_modules\\applicationinsights-native-metrics\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics
node-pre-gyp ERR! node -v v12.18.2
node-pre-gyp ERR! node-pre-gyp -v v1.0.3
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics\build\Release\native_metrics.node --module_name=native_metrics --module_path=C:\Users\joe\AppData\Roaming\npm\node_modules\applicationinsights-native-metrics\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --msvs_version=2012' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\joe\AppData\Roaming\npm-cache\_logs\2021-04-06T11_19_56_706Z-debug.lo

I have the latest VIsual Studio Community installed.
What am I doing wrong? How to fix?

binary assets not being published with the latest node18 version

binary assets not being published with the last node18 version.
updating to node 18 docker image gives below error :

npm ERR! path /app/node_modules/applicationinsights-native-metrics
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/app/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node --module_name=native_metrics --module_path=/app/node_modules/applicationinsights-native-metrics/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for "/app/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v108-linux-x64-musl.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v108-linux-x64-musl.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, musl) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v108-linux-x64-musl.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.10 found at "/usr/bin/python3"
npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v18.14.0/node-v18.14.0-headers.tar.gz

Module parse failed: Unexpected character '�'

i have added the native metrics package but keep getting this error when running angular.
i have tried version 0.0.6 and the latest 0.0.7 but same error

image

i have tried adding opentelemetrics , updating application insights packages but same error, no matter what i change.

i have also tried this in node v 12.21.0 and 14.15.0 both come back with the same error.

look forward to some help thanks

Missing binary for arm64

On macOS Silicon with arm chipset (M1 here) there is an error during installation:

npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/apps/fe/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.8/native_metrics-v0.0.8-node-v108-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.8/native_metrics-v0.0.8-node-v108-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.8/native_metrics-v0.0.8-node-v108-darwin-arm64-unknown.tar.gz

Is there any workaround?

Docker node:12-alpine ([email protected]) npm install fails

Issue installing in Docker container node:12-alpine

FROM node:12-alpine as nodejs

#
# STAGE: INSTALL PYTHON/C++
#

FROM nodejs as nodejs-buildtools

# --no-cache: download package index on-the-fly, no need to cleanup afterwards
# --virtual: bundle packages, remove whole bundle at once, when done
RUN apk --no-cache --virtual build-dependencies add \
  python \
  make \
  g++

#
# STAGE: INSTALL PACKAGES
#

FROM nodejs-buildtools as installer
ARG mode=production
# is passed in as --build-arg npm_token=$(System.AccessToken)  in VSTS (Must enable OAuth Token in scripts in the "Run on Agent" settings in the pipeline)
ARG npm_token

WORKDIR /usr/src/app

# Authorize the private npm registry
COPY .npmrc ./
COPY package*.json* ./
ENV NODE_ENV development
RUN printf "\n\
  //pkgs.dev.azure.com/xxx/_packaging/xxx/npm/registry/:_authToken=${npm_token}\n\
  //pkgs.dev.azure.com/xxx/_packaging/xxx/npm/:_authToken=${npm_token}" >> .npmrc \
  && npm ci \
  && if [ "$mode" = "production" ] ; then rm -f .npmrc; else echo '$mode: skip rm .npmrc'; fi

# ... rest of file excluded
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.5/native_metrics-v0.0.5-node-v72-linux-x64-musl.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, musl) (falling back to source compile with node-gyp)
make: Entering directory '/usr/src/app/node_modules/applicationinsights-native-metrics/build'
  CXX(target) Release/obj.target/native_metrics/src/GcProfiler.o
In file included from ../src/GcProfiler.hh:3,
                 from ../src/GcProfiler.cc:1:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from /root/.cache/node-gyp/12.13.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/GcProfiler.hh:3,
                 from ../src/GcProfiler.cc:1:
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':        
/root/.cache/node-gyp/12.13.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:65:61:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
  CXX(target) Release/obj.target/native_metrics/src/LoopProfiler.o
In file included from ../src/LoopProfiler.hh:3,
                 from ../src/LoopProfiler.cc:4:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from /root/.cache/node-gyp/12.13.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/LoopProfiler.hh:3,
                 from ../src/LoopProfiler.cc:4:
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':        
/root/.cache/node-gyp/12.13.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:65:61:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
  CXX(target) Release/obj.target/native_metrics/src/ResourceProfiler.o
../src/ResourceProfiler.cc:1:9: warning: #pragma once in main file
 #pragma once
         ^~~~
In file included from ../src/ResourceProfiler.cc:3:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from /root/.cache/node-gyp/12.13.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/ResourceProfiler.cc:3:
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':        
/root/.cache/node-gyp/12.13.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:65:61:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
  CXX(target) Release/obj.target/native_metrics/src/native_metrics.o
In file included from ../src/native_metrics.cc:1:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from ../../nan/nan.h:54,
                 from ../src/native_metrics.cc:1:
../src/native_metrics.cc: At global scope:
/root/.cache/node-gyp/12.13.0/include/node/node.h:560:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]     
       (node::addon_register_func) (regfunc),                          \
                                           ^
/root/.cache/node-gyp/12.13.0/include/node/node.h:594:3: note: in expansion of macro 'NODE_MODULE_X'
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/native_metrics.cc:17:1: note: in expansion of macro 'NODE_MODULE'
 NODE_MODULE(native_metrics, Init)
 ^~~~~~~~~~~
In file included from /root/.cache/node-gyp/12.13.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/native_metrics.cc:1:
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':        
/root/.cache/node-gyp/12.13.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.13.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:65:61:   required from here
/root/.cache/node-gyp/12.13.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
  SOLINK_MODULE(target) Release/obj.target/native_metrics.node
  COPY Release/native_metrics.node
make: Leaving directory '/usr/src/app/node_modules/applicationinsights-native-metrics/build'

add release links for node 16

Trying to install native metrics via npm

full log:

> npm i applicationinsights-native-metrics
npm ERR! code 1
npm ERR! path /path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/home/oleg/.local/share/nvm/v16.2.0/bin/node /home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node --module_name=native_metrics --module_path=/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for "/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v93-linux-x64-glibc.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v93-linux-x64-glibc.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v93-linux-x64-glibc.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.9.4 found at "/usr/bin/python3"
npm ERR! (node:39012) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/oleg/.cache/node-gyp/16.2.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/oleg/.cache/node-gyp/16.2.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/oleg/.cache/node-gyp/16.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack     at getNotFoundError (/home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack     at /home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
npm ERR! gyp ERR! stack     at step (/home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack     at /home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
npm ERR! gyp ERR! stack     at subStep (/home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack     at /home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack     at /home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack     at /home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.11.0-17-generic
npm ERR! gyp ERR! command "/home/oleg/.local/share/nvm/v16.2.0/bin/node" "/home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node" "--module_name=native_metrics" "--module_path=/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/home/oleg/.local/share/nvm/v16.2.0/bin/node /home/oleg/.local/share/nvm/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node --module_name=native_metrics --module_path=/path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/path-to-my-repo/ssr_lazy_loading/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.11.0-17-generic
npm ERR! node-pre-gyp ERR! command "/home/oleg/.local/share/nvm/v16.2.0/bin/node" "/path-to-my-repo/ssr_lazy_loading/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /path-to-my-repo/ssr_lazy_loading/node_modules/applicationinsights-native-metrics
npm ERR! node-pre-gyp ERR! node -v v16.2.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.5
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/oleg/.npm/_logs/2021-05-27T10_28_29_409Z-debug.log

look at this line: npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.6/native_metrics-v0.0.6-node-v93-linux-x64-glibc.tar.gz

in your 0.0.6 release you have packages with node module's version 57, 64, 72, 83, 88, but no 93

can you add it?

can't install applicationinsights-native-metrics

Hello,

Is there anyone knows why i get error when installing applicationinsights-native-metrics.
I have installed already the latest version of applicationinsights but in order to work i need the applicationinsights-native-metrics dependency but i get this error:

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.5/native_metrics-v0.0.5-node-v72-win32-x64-unknown.tar.gz node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp) gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if the py launcher can be used to find Python 2 gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - "C:\Python37\python.exe" could not be run gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "C:\Path\To\python.exe" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! stack at exithandler (child_process.js:310:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5)

Error if trying to use source maps

ERROR in ./node_modules/applicationinsights-native-metrics/build/Release/native_metrics.map 3:11
Module parse failed: Unexpected token (3:11)
You may need an appropriate loader to handle this file type.
|  native_metrics
|
>  Timestamp is 5cc1f621 (Thu Apr 25 11:02:09 2019)
|
|  Preferred load address is 0000000180000000
 @ ./node_modules/applicationinsights-native-metrics/out/main.js 16:14-56
 @ ./node_modules/applicationinsights/out/AutoCollection/NativePerformance.js
 @ ./node_modules/applicationinsights/out/applicationinsights.js
 @ ./server.ts

I'm unable to exclude it from webpack. Any suggestions?

Can't resolve '../build/Release/native_metrics' in /out

I've been using this package for a week or so now, and it's been building fine until just now - both locally and in our build process, I am getting this error when trying to build my project. Can you help?

Failed to compile.

./node_modules/applicationinsights-native-metrics/out/main.js
Module not found: Can't resolve '../build/Release/native_metri
cs' in '/Users/***/git/research-center-web/node_modules
/applicationinsights-native-metrics/out'

> Build error occurred
Error: > Build failed because of webpack errors
    at Object.build [as default] (/Users/***/git/research-center-web/node_modules/next/dist/build/index.js:192:15)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
error Command failed with exit code 1.

Restrict metrics to container only

Hello guys, I would like to know if it is possible to restrict the capture metrics only to the limit imposed on the container? today it returns me the consumption of the kubernetes cluster node.

Thanks!

Azure App Service needs ia32 binary

Hi, I'm running my server on a Windows Azure App Service, and it seems like those use the ia32 platform, because my deployment fails when trying to download: https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.5/native_metrics-v0.0.5-node-v64-win32-ia32-unknown.tar.gz.

I think this library needs to also be built for ia32?

Unable to use version 0.0.9

I am using this npm in this docker file: https://github.com/curia-damiano/docker-ghost-ai/blob/master/5/alpine/ai/DOCKERFILE

If I use version 0.0.7 or 0.0.8, I am able to build it.

If I use version 0.0.9, I get this error:

#4 11.94 npm ERR! code 1
#4 11.94 npm ERR! path /opt/ai/node_modules/applicationinsights-native-metrics
#4 11.94 npm ERR! command failed
#4 11.94 npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build
#4 11.94 npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/ai/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node --module_name=native_metrics --module_path=/opt/ai/node_modules/applicationinsights-native-metrics/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
#4 11.94 npm ERR! node-pre-gyp info it worked if it ends with ok
#4 11.94 npm ERR! node-pre-gyp info using [email protected]
#4 11.94 npm ERR! node-pre-gyp info using [email protected] | linux | x64
#4 11.95 npm ERR! node-pre-gyp info check checked for "/opt/ai/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node" (not found)
#4 11.95 npm ERR! node-pre-gyp http GET https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.9/native_metrics-v0.0.9-node-v93-linux-x64-musl.tar.gz
#4 11.95 npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.9/native_metrics-v0.0.9-node-v93-linux-x64-musl.tar.gz
#4 11.95 npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v93 ABI, musl) (falling back to source compile with node-gyp)
#4 11.95 npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Microsoft/ApplicationInsights-node.js-native-metrics/releases/download/v0.0.9/native_metrics-v0.0.9-node-v93-linux-x64-musl.tar.gz
#4 11.95 npm ERR! gyp info it worked if it ends with ok
#4 11.95 npm ERR! gyp info using [email protected]
#4 11.95 npm ERR! gyp info using [email protected] | linux | x64
#4 11.95 npm ERR! gyp info ok
#4 11.95 npm ERR! gyp info it worked if it ends with ok
#4 11.95 npm ERR! gyp info using [email protected]
#4 11.95 npm ERR! gyp info using [email protected] | linux | x64
#4 11.95 npm ERR! gyp ERR! find Python
#4 11.95 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#4 11.95 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#4 11.95 npm ERR! gyp ERR! find Python checking if "python3" can be used
#4 11.95 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
#4 11.95 npm ERR! gyp ERR! find Python checking if "python" can be used
#4 11.95 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
#4 11.95 npm ERR! gyp ERR! find Python
#4 11.95 npm ERR! gyp ERR! find Python **********************************************************
#4 11.95 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#4 11.95 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#4 11.95 npm ERR! gyp ERR! find Python you can try one of the following options:
#4 11.95 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#4 11.95 npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
#4 11.95 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#4 11.95 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#4 11.95 npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
#4 11.95 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#4 11.95 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#4 11.95 npm ERR! gyp ERR! find Python **********************************************************
#4 11.95 npm ERR! gyp ERR! find Python
#4 11.95 npm ERR! gyp ERR! configure error
#4 11.95 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#4 11.95 npm ERR! gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#4 11.95 npm ERR! gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#4 11.95 npm ERR! gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#4 11.95 npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#4 11.95 npm ERR! gyp ERR! stack at exithandler (node:child_process:410:5)
#4 11.95 npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:422:5)
#4 11.95 npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#4 11.95 npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#4 11.95 npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:485:16)
#4 11.95 npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
#4 11.95 npm ERR! gyp ERR! System Linux 5.15.90.1-microsoft-standard-WSL2
#4 11.95 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/ai/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node" "--module_name=native_metrics" "--module_path=/opt/ai/node_modules/applicationinsights-native-metrics/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
#4 11.95 npm ERR! gyp ERR! cwd /opt/ai/node_modules/applicationinsights-native-metrics
#4 11.95 npm ERR! gyp ERR! node -v v16.19.1
#4 11.95 npm ERR! gyp ERR! node-gyp -v v9.1.0
#4 11.95 npm ERR! gyp ERR! not ok
#4 11.95 npm ERR! node-pre-gyp ERR! build error
#4 11.95 npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/ai/node_modules/applicationinsights-native-metrics/build/Release/native_metrics.node --module_name=native_metrics --module_path=/opt/ai/node_modules/applicationinsights-native-metrics/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
#4 11.95 npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/opt/ai/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#4 11.95 npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#4 11.95 npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1100:16)
#4 11.95 npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
#4 11.95 npm ERR! node-pre-gyp ERR! System Linux 5.15.90.1-microsoft-standard-WSL2
#4 11.95 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/opt/ai/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#4 11.95 npm ERR! node-pre-gyp ERR! cwd /opt/ai/node_modules/applicationinsights-native-metrics
#4 11.95 npm ERR! node-pre-gyp ERR! node -v v16.19.1
#4 11.95 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
#4 11.95 npm ERR! node-pre-gyp ERR! not ok
#4 11.95
#4 11.95 npm ERR! A complete log of this run can be found in:
#4 11.95 npm ERR! /root/.npm/_logs/2023-03-08T16_52_35_607Z-debug-0.log

executor failed running [/bin/sh -c mkdir /opt/ai && cd /opt/ai && npm init -y && npm install --production --save applicationinsights@^2.5.0 && npm install --production --save applicationinsights-native-metrics@^0.0.9]: exit code: 1
damiano@CURIADAMIANOPC:~/docker-ghost-ai$

This problem seems to be similar to the existing issue #9 .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.