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.

Http auto instrumentation fails when using @FileInterceptor

See original GitHub issue

Sample fork : https://github.com/benitezho/nestjs-otel

Using: nodeJS 16.1.0

Description

I uploaded a sample nestjs main module ready to run. In the example i created a AppController that outputs on the console the active span from the current context, the line that reproduces the issue its: // @UseInterceptors(FileInterceptor('field')) If you uncomment this line, the active span from the current context its undefined when a new request its incoming.

My guess is that Nestjs’s @FileInterceptor that uses multer under the hood, somehow it’s replacing the async hook request listeners. For that reason, i don’t know if this issue should be here.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
pragmaticivancommented, Jul 28, 2021
1reaction
pragmaticivancommented, Jul 28, 2021

@pratimsc @benitezho a lot of the problems I found when I created that lib are going to be fixed in this PR: https://github.com/pragmaticivan/nestjs-otel/pull/55

It will require a Major version though. FYI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

multer options fileFilter FileInterceptor throws http status code ...
Bug Report Same as #465 , the fileFilter returns an internal error while I'd expect a bad request when file type mismatch.
Read more >
multer - Nestjs throw error and http status 400 when fileFilter in ...
I'd rather use the logging for this instead. (The application has middleware in place to pick up NestJS errors and log them automagically.)...
Read more >
File upload | NestJS - A progressive Node.js framework
To upload a single file, simply tie the FileInterceptor() interceptor to the route ... The HTTP status code to be thrown in case...
Read more >
Dual-Force: Understanding WebView Malware via Cross ...
Statements that invoke string comparison methods whose arguments contain “http://”, “file:///” or “javascript:”. These locations are identified for further use ...
Read more >
no metadata for categoryrepository was found. nestjs - You.com
js location, but i keep getting the following error when running my server.spec.ts file through mocha: { EntityMetadataNotFound: No metadata for ...
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