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

Update 10-open-telemetry.mdx, missing packages. #65885

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

yurivangeffen
Copy link

@yurivangeffen yurivangeffen commented May 17, 2024

It seems that some package installs are missing from the documentation, which leads to the following error:

Import trace for requested module:
./src/instrumentation.ts
Error [ERR_MODULE_NOT_FOUND]: An error occurred while loading instrumentation hook: Cannot find package <PACKAGE NAME> imported from <ROOT>/node_modules/@vercel/otel/dist/node/index.js

My instrumentation file looks like this:

import { registerOTel } from "@vercel/otel";

export function register() {
  registerOTel({ serviceName: "NAME" });
}

It seems that some package installs are missing from the documentation, which leads to the following error:

Import trace for requested module:
./src/instrumentation.ts
Error [ERR_MODULE_NOT_FOUND]: An error occurred while loading instrumentation hook: Cannot find package <PACKAGE NAME> imported from <ROOT>/node_modules/@vercel/otel/dist/node/index.js
@yurivangeffen yurivangeffen requested review from a team as code owners May 17, 2024 12:26
@yurivangeffen yurivangeffen requested review from ismaelrumzan and jh3y and removed request for a team May 17, 2024 12:26
@ijjk ijjk added the Documentation Related to Next.js' official documentation. label May 17, 2024
@ijjk
Copy link
Member

ijjk commented May 17, 2024

Allow CI Workflow Run

  • approve CI run for commit: a746e1c

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@yurivangeffen
Copy link
Author

Hi all! I noticed that following the docs didn't lead to a working version of the @vercel/otel exporter. It seems that there are some implicit dependencies, namely @opentelemetry/api, and @opentelemetry/api-logs.

If this is not a documentation issue, but an issue with the package or setup, don't hesitate to close!

@samcx
Copy link
Member

samcx commented May 20, 2024

@yurivangeffen Can you clarify what you had in your instrumentation.ts file?

@yurivangeffen
Copy link
Author

@yurivangeffen Can you clarify what you had in your instrumentation.ts file?

Added it to the original comment.

@samcx samcx requested a review from dvoytenko May 21, 2024 20:41
@@ -27,10 +27,10 @@ That's why we prepared a package `@vercel/otel` that helps you get started quick

### Using `@vercel/otel`

To get started, you must install `@vercel/otel`:
To get started, you must install `@vercel/otel`, `@opentelemetry/api`, and `@opentelemetry/api-logs`:
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need @opentelemetry/api-logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants