question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ApplicationInsights crashes on the container start with the ((TypeError: api_1.createContextKey is not a function)) excption

See original GitHub issue

our setup

  • Azure App Service
  • Docker
  • node:10.16.0
  • we use ssh inside docker
  • we are trying to telemetry node.js api with ApplicationInsights-node_

when we did everything locally following by this instruction _https://docs.microsoft.com/en-us/azure/azure-monitor/app/nodejs_

  • we could see all telemetry on the app insight portal in the azure portal tab.
  • but when we started trying to deploy that solution to the dev stand we have got problems.
  1. First our build pipeline started crashing. I fixed it by updating the typescript version in our package.json. It was some 3rd version, I replaced it with 4.1.2 and reinstall node_modules. Build became successful.

  2. But now our node application crashing with the node js exception after each attempt to start the container inside of the azure web app

  3. Somewhere I read what it could be somehow connected to the other azure npm modules we use, here are the list:
    @azure/storage-queue”: “^12.4.0”, “azure-storage”: “^2.10.4”,

  4. here is an exception:

2022-02-01T12:47:57.908240807Z TypeError: api_1.createContextKey is not a function 2022-02-01T12:47:57.908266308Z at Object.anonymous (/airofit-api/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js:20:36) 2022-02-01T12:47:57.908273008Z at Module._compile (internal/modules/cjs/loader.js:776:30) 2022-02-01T12:47:57.908276609Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) 2022-02-01T12:47:57.908280109Z at Module.load (internal/modules/cjs/loader.js:653:32) 2022-02-01T12:47:57.908289309Z at tryModuleLoad (internal/modules/cjs/loader.js:593:12) 2022-02-01T12:47:57.908292609Z at Function.Module._load (internal/modules/cjs/loader.js:585:3) 2022-02-01T12:47:57.908295909Z at Module.require (internal/modules/cjs/loader.js:690:17) 2022-02-01T12:47:57.908299610Z at Module.patchedRequire [as require] (/airofit-api/node_modules/diagnostic-channel/dist/src/patchRequire.js:15:46) 2022-02-01T12:47:57.908303210Z at require (internal/modules/cjs/helpers.js:25:18) 2022-02-01T12:47:57.908306510Z at Object.anonymous (/airofit-api/node_modules/@opentelemetry/core/build/src/baggage/propagation/HttpBaggagePropagator.js:20:28)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
eeropenttinencommented, Feb 18, 2022

I had a similar issue. The solution here resolved my issue. I updated the version of @azure/storage-blob and that did the trick.

1reaction
auxfixcommented, Feb 18, 2022

Hey @eeropenttinen, thank you so much! I will definitely try it!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

appInsights.setup().start(); returns an error - Stack Overflow
I'm using appInsights v2.1.4 in my NodeJs Azure Function. ... [Error] TypeError: api_1.createContextKey is not a functionat Object.
Read more >
Renovate Bot Package Diff
- By default, we use the AppInsights key to detect whether or not the telemetry is first-party. The constructor now takes an optional...
Read more >
don't convert xyz in pyworld - Facebookresearch/Fairo - IssueHint
ApplicationInsights crashes on the container start with the ((TypeError: api_1.createContextKey is not a function)) excption, 8, 2022-02-15, 2022-10-22.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found