Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(otel-node): fix types for nestjs core instrumentation #589

Closed
wants to merge 1 commit into from

Conversation

david-luna
Copy link
Member

@david-luna david-luna commented Feb 5, 2025

#558 was created to add this instrumentation but it turns out it was already added in f5a0656. This PR just fixes the types of the configurations map.

Adding a test case was considered an tried locally but it is too much effort since it requires to have a specific setup for it (NestJS project, install dependencies, run the project and mockotlpserver at the same time, etc.). runTestFixtures is not enough and create something just for 1 instrumentation just feels too much

Closes: #558

@@ -50,7 +50,7 @@
* "@opentelemetry/instrumentation-mongoose": import('@opentelemetry/instrumentation-mongoose').MongooseInstrumentationConfig | InstrumentationFactory,
* "@opentelemetry/instrumentation-mysql": import('@opentelemetry/instrumentation-mysql').MySQLInstrumentation | InstrumentationFactory,
* "@opentelemetry/instrumentation-mysql2": import('@opentelemetry/instrumentation-mysql2').MySQL2Instrumentation | InstrumentationFactory,
* "@opentelemetry/instrumentation-nestjs-core": import('@opentelemetry/instrumentation').InstrumentationConfig | InstrumentationFactory,
* "@opentelemetry/instrumentation-nestjs-core": import('@opentelemetry/instrumentation-nestjs-core').NestInstrumentation | InstrumentationFactory,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't seem right. This should be the config type that the instrumentations takes to its constructor.
The NestInstrumentation doesn't take any special config: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/4560d144ced8b758395003966028fbf090065105/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts#L45-L47

Copy link
Member Author

@david-luna david-luna Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! So this is not needed. Closing then

@david-luna david-luna closed this Feb 6, 2025
@david-luna david-luna deleted the 558-instr-nestjs branch February 6, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add instr-nestjs-core
2 participants