|
| 1 | +name: Bug Report |
| 2 | +description: File a bug report |
| 3 | +labels: ["bug", "triage"] |
| 4 | +body: |
| 5 | + - type: markdown |
| 6 | + attributes: |
| 7 | + value: | |
| 8 | + Thanks for taking the time to fill out this bug report! |
| 9 | + Please make sure to fill out the entire form below, |
| 10 | + providing as much context as you can in order to help us |
| 11 | + triage and track down your bug as quickly as possible. |
| 12 | +
|
| 13 | + Before filing a bug, please be sure you have searched through |
| 14 | + [existing bugs](https://github.com/open-telemetry/opentelemetry-js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug) |
| 15 | + to see if your bug is already addressed. |
| 16 | +
|
| 17 | + If your bug is related to an instrumentation or plugin in [opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib) |
| 18 | + please be sure to file it there. |
| 19 | + - type: textarea |
| 20 | + attributes: |
| 21 | + label: What happened? |
| 22 | + description: Please provide as much detail as you reasonably can. |
| 23 | + value: | |
| 24 | + ## Steps to Reproduce |
| 25 | +
|
| 26 | + ## Expected Result |
| 27 | +
|
| 28 | + ## Actual Result |
| 29 | +
|
| 30 | + ## Additional Details |
| 31 | +
|
| 32 | + validations: |
| 33 | + required: true |
| 34 | + - type: textarea |
| 35 | + attributes: |
| 36 | + label: OpenTelemetry Setup Code |
| 37 | + description: Please provide the code you use to set up OpenTelemetry |
| 38 | + placeholder: | # This comes from our README.md |
| 39 | + // tracing.js |
| 40 | +
|
| 41 | + 'use strict' |
| 42 | +
|
| 43 | + const process = require('process'); |
| 44 | + const opentelemetry = require('@opentelemetry/sdk-node'); |
| 45 | + const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); |
| 46 | + const { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base'); |
| 47 | + const { Resource } = require('@opentelemetry/resources'); |
| 48 | + const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); |
| 49 | +
|
| 50 | + // configure the SDK to export telemetry data to the console |
| 51 | + // enable all auto-instrumentations from the meta package |
| 52 | + const traceExporter = new ConsoleSpanExporter(); |
| 53 | + const sdk = new opentelemetry.NodeSDK({ |
| 54 | + resource: new Resource({ |
| 55 | + [SemanticResourceAttributes.SERVICE_NAME]: 'my-service', |
| 56 | + }), |
| 57 | + traceExporter, |
| 58 | + instrumentations: [getNodeAutoInstrumentations()] |
| 59 | + }); |
| 60 | +
|
| 61 | + // initialize the SDK and register with the OpenTelemetry API |
| 62 | + // this enables the API to record telemetry |
| 63 | + sdk.start() |
| 64 | + .then(() => console.log('Tracing initialized')) |
| 65 | + .catch((error) => console.log('Error initializing tracing', error)); |
| 66 | +
|
| 67 | + // gracefully shut down the SDK on process exit |
| 68 | + process.on('SIGTERM', () => { |
| 69 | + sdk.shutdown() |
| 70 | + .then(() => console.log('Tracing terminated')) |
| 71 | + .catch((error) => console.log('Error terminating tracing', error)) |
| 72 | + .finally(() => process.exit(0)); |
| 73 | + }); |
| 74 | + render: "JavaScript" |
| 75 | + - type: textarea |
| 76 | + attributes: |
| 77 | + label: package.json |
| 78 | + description: If possible, please provide your full package.json. If not, please provide at least your list of dependencies and their versions, especially OpenTelemetry versions. |
| 79 | + render: "JSON" |
| 80 | + placeholder: | |
| 81 | + { |
| 82 | + "name": "my-app", |
| 83 | + "scripts": { |
| 84 | + "start": "node -r tracing.js app.js" |
| 85 | + }, |
| 86 | + "dependencies": { |
| 87 | + "@opentelemetry/api": "^1.2.0", |
| 88 | + "@opentelemetry/sdk-trace-base": "~1.3.1", |
| 89 | + ... |
| 90 | + } |
| 91 | + } |
| 92 | + - type: textarea |
| 93 | + attributes: |
| 94 | + label: Relevant log output |
| 95 | + description: | |
| 96 | + Please copy and paste any relevant log output. |
| 97 | + render: shell |
0 commit comments