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

collapse block fix #5463

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions content/en/docs/languages/js/getting-started/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ for Node.js is still under development hence an example for it is not provided
below. Look [here](/docs/languages/js) for more info about the status of
OpenTelemetry in JavaScript. {{% /alert %}}

## Prerequisites

## Prerequisites
Copy link
Member

Choose a reason for hiding this comment

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

make sure you do not apply changes that are unrelated to this PR. You may be able to remove them easily by running npm run fix:format locally, otherwise take a look into the files and remove all unrelated changes.

Ensure that you have the following installed locally:

- [Node.js](https://nodejs.org/en/download/)
Expand Down Expand Up @@ -51,10 +51,10 @@ npm install typescript \
ts-node \
@types/node \
express \
@types/express
@types/express

# initialize typescript
npx tsc --init
npx tsc --init
```

{{% /tab %}} {{% tab JavaScript %}}
Expand Down Expand Up @@ -251,8 +251,9 @@ Open <http://localhost:8080/rolldice> in your web browser and reload the page a
few times. After a while you should see the spans printed in the console by the
`ConsoleSpanExporter`.

<details>
<summary>View example output</summary>
<!-- <details>
<summary>View example output</summary> -->
{{% preview-fade %}}

```json
{
Expand Down Expand Up @@ -333,15 +334,18 @@ few times. After a while you should see the spans printed in the console by the
}
```

</details>
{{% /preview-fade %}}

<!-- </details> -->

The generated span tracks the lifetime of a request to the `/rolldice` route.

Send a few more requests to the endpoint. After a moment, you'll see metrics in
the console output, such as the following:

<details>
<summary>View example output</summary>
<!-- <details>
<summary>View example output</summary> -->
{{% preview-fade %}}

```yaml
{
Expand Down Expand Up @@ -466,8 +470,9 @@ the console output, such as the following:
}
```

</details>

{{% /preview-fade %}}
<!-- </details> -->

## Next Steps

Enrich your instrumentation generated automatically with
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"Notes": [
"The 'all' runs _all_ named scripts in sequence, even if one fails; and exits with failure in that case."
],
"scripts": {
"scripts": {
"__check:links": "make --keep-going check-links",
"_build": "npm run _hugo -- -e dev --buildDrafts --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"",
"_check:format:any": "npx prettier --check --ignore-path ''",
"_check:format:ja+zh": "npm run _check:format:nowrap -- content/ja content/zh",
"_check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve",
"_check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve",
"_check:format": "npx prettier --check .",
"_check:links--md": "npx markdown-link-check --config .markdown-link-check.json *.md",
"_check:links--warn": "npm run _check:links || (echo; echo 'WARNING: see link-checker output for issues.'; echo)",
Expand Down Expand Up @@ -156,7 +156,7 @@
"node": "20.x"
},
"gitHubActionCacheKey": "2023-07-13 - change this key to force cache refresh",
"private": true,
"private": true,
"prettier": {
"proseWrap": "always",
"singleQuote": true
Expand Down