Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

docs: fix crash in README example #106

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

trentm
Copy link
Contributor

@trentm trentm commented Jul 22, 2021

When running the example in the README before this change I get:

% node --trace-warnings example.js
{
  traceId: 'b0a511fe69ff65345b18db0486cb8568',
  parentId: undefined,
  name: 'do operation',
  id: '0ccd8ba64328a259',
  kind: 0,
  timestamp: 1626991645695433,
  duration: 1004811,
  attributes: {},
  status: { code: 0 },
  events: []
}
(node:47750) UnhandledPromiseRejectionWarning: ReferenceError: output is not defined
    at operation (/Users/trentm/tm/otelplay/example.js:24:3)
    at async main (/Users/trentm/tm/otelplay/example.js:29:5)
    at emitUnhandledRejectionWarning (internal/process/promises.js:168:15)
    at processPromiseRejections (internal/process/promises.js:247:11)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)
(node:47750) ReferenceError: output is not defined
    at operation (/Users/trentm/tm/otelplay/example.js:24:3)
    at async main (/Users/trentm/tm/otelplay/example.js:29:5)
(node:47750) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitDeprecationWarning (internal/process/promises.js:180:11)
    at processPromiseRejections (internal/process/promises.js:249:13)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)

Afterwards:

% node --trace-warnings example.js
{
  traceId: '1a7fad4ba55e693763457fb873a7c56b',
  parentId: undefined,
  name: 'do operation',
  id: '9b30b19524c006c6',
  kind: 0,
  timestamp: 1626991653931635,
  duration: 1004384,
  attributes: {},
  status: { code: 0 },
  events: []
}
{
  traceId: 'd38b7fc5ac00bfa32d3e62a5b2363a66',
  parentId: undefined,
  name: 'do operation',
  id: '9f1ef11fae2eec85',
  kind: 0,
  timestamp: 1626991654947103,
  duration: 1001100,
  attributes: {},
  status: { code: 0 },
  events: []
}
...

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 22, 2021

CLA Signed

The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #106 (cc4925f) into main (6dd34e2) will not change coverage.
The diff coverage is n/a.

❗ Current head cc4925f differs from pull request most recent head 675aee6. Consider uploading reports for the commit 675aee6 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main     #106   +/-   ##
=======================================
  Coverage   94.90%   94.90%           
=======================================
  Files          42       42           
  Lines         569      569           
  Branches       89       89           
=======================================
  Hits          540      540           
  Misses         29       29           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6dd34e2...675aee6. Read the comment docs.

@dyladan dyladan added the documentation Improvements or additions to documentation label Jul 26, 2021
@dyladan dyladan merged commit d783ede into open-telemetry:main Jul 26, 2021
@trentm trentm deleted the fix-readme-example branch July 28, 2021 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants