-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit; my attempt without the full setup code from open-teleme…
- Loading branch information
0 parents
commit 49cb0fb
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "repro-otel-js-issue-3701", | ||
"version": "1.0.0", | ||
"private": "true", | ||
"main": "dist/repro.js", | ||
"scripts": { | ||
"build": "esbuild --bundle src/repro.ts --outdir=dist --platform=node", | ||
"start": "npm run build && node dist/repro.js" | ||
}, | ||
"devDependencies": { | ||
"@tsconfig/node16": "^1.0.3", | ||
"esbuild": "^0.17.14" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/auto-instrumentations-node": "^0.36.4", | ||
"@opentelemetry/sdk-node": "^0.36.1", | ||
"@opentelemetry/sdk-trace-base": "^1.10.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NodeSDK } from '@opentelemetry/sdk-node' | ||
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node' | ||
import { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-base' | ||
|
||
const sdk = new NodeSDK({ | ||
traceExporter: new ConsoleSpanExporter(), | ||
instrumentations: [getNodeAutoInstrumentations()], | ||
}); | ||
|
||
sdk.start(); | ||
|
||
setInterval(() => { | ||
console.log('hi') | ||
}, 5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "@tsconfig/node16/tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "dist" | ||
} | ||
} |