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

Adding Remix documentation #86

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

NCHitsman
Copy link

Adding Remix documentation. Because Remix is mainly built off of React the implementation is fairly straight forward. Using the already built Browser package, we can mirror the implementation. I also added an extra section for Route Tracking based on the requests made in this issue (#68). It is also worth noting that Remix can use one of many backends (Express, Cloudflare Workers, Netlify, Vercel, Fastly, AWS, Deno, Azure, Fastify, Firebase, etc.). To this end I linked the Node.js documentation for use in Node.js servers.

I made sure to test this using the tutorial Remix project and cloud HyperDX.

Copy link

changeset-bot bot commented Nov 8, 2023

⚠️ No Changeset found

Latest commit: cfa6b90

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

npm install opentelemetry-instrumentation-remix
```

#### Create tracing.js file in application folder
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to tell people how to run with 'tracing.js' file ?

Copy link
Author

Choose a reason for hiding this comment

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

Oh yeah totally forgot, will add!

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry for the back and forth. could we rename this tracing.js to instrument.js ?

npm install @hyperdx/browser
```

### Initialize HyperDX
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to mention the file path for adding this code snippet ?

#### Using NPX

```bash
HYPERDX_API_KEY='<YOUR_HYPERDX_API_KEY>' OTEL_SERVICE_NAME='<YOUR_APP_NAME>' NODE_OPTIONS='-r <REALATIVE_TRACKING.JS_PATH>' remix dev
Copy link
Contributor

Choose a reason for hiding this comment

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

We also want to make sure this works with the command in prod env

Copy link
Contributor

Choose a reason for hiding this comment

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

does this assume users have 'remix' cli installed ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if you guys already discussed this, but I'm wondering if it's better to just bundle remix into the default SDK setup so Remix users get a first-class experience as well?

MikeShi42
MikeShi42 previously approved these changes Nov 10, 2023
Copy link
Contributor

@MikeShi42 MikeShi42 left a comment

Choose a reason for hiding this comment

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

just minor improvement suggestions

Remix_Documentation/Remix.md Show resolved Hide resolved
Remix_Documentation/Remix.md Outdated Show resolved Hide resolved
#### Using NPX

```bash
HYPERDX_API_KEY='<YOUR_HYPERDX_API_KEY>' OTEL_SERVICE_NAME='<YOUR_APP_NAME>' NODE_OPTIONS='-r <REALATIVE_TRACKING.JS_PATH>' remix dev
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if you guys already discussed this, but I'm wondering if it's better to just bundle remix into the default SDK setup so Remix users get a first-class experience as well?


## (Optional) Use [opentelemetry-instrumentation-remix](https://github.com/justindsmith/opentelemetry-instrumentations-js/tree/main/packages/instrumentation-remix) package for Node.js servers.

This will enable additional Remix specific spans.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to expand on what kind of spans (ex. what is being instrumented and/or what class of problems would that isntrumentation solve?). The statement as is, is a bit vague and wouldn't give me much info to make a decision whether this step is worth doing.

I think if it's possible for us to have a concise example of some benefits of enabling it, that'd be awesome. Or at the minimum perhaps just linking out to the event types in the docs.

npm install @hyperdx/browser
```

### Initialize HyperDX in root.tsx file

Choose a reason for hiding this comment

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

Would this be more appropriate in entry.client.tsx?

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.

None yet

4 participants