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

docs: add quickstart code example #2365

Merged
merged 4 commits into from
Jul 26, 2021

Conversation

vreynolds
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

subjective tradeoffs:

  • node metapackage for fewer dependency lines and more instrumentation out of the box, but other docs use individual instrumentation pacakges
  • console exporter so no need to set up a tracing backend, but you don't get to see nice graphs

@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #2365 (0278662) into main (3bc3452) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 0278662 differs from pull request most recent head b5c1e09. Consider uploading reports for the commit b5c1e09 to get more accurate results

@@            Coverage Diff             @@
##             main    #2365      +/-   ##
==========================================
- Coverage   92.79%   92.77%   -0.02%     
==========================================
  Files         145      145              
  Lines        5221     5221              
  Branches     1070     1070              
==========================================
- Hits         4845     4844       -1     
- Misses        376      377       +1     
Impacted Files Coverage Δ
...emetry-core/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️

Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Since this is likely the first documentation users see I would like to have comments that explain what the more confusing parts are doing.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
* add comments
* make a note about the meta package
* use new SemanticResourceAttributes name
@CptSchnitz
Copy link
Contributor

CptSchnitz commented Jul 23, 2021

Shouldn't @opentelemetry/node and not @opentelemetry/sdk-node be installed if the tracing is initiated like this?

@vreynolds
Copy link
Contributor Author

Shouldn't @opentelemetry/node and not @opentelemetry/sdk-node be installed if the tracing is initiated like this?

I initially imported node and tracing individually, but sdk-node was mentioned in the SIG meeting and seemed like a better candidate here, since it's meant to be a more wholesale package for Node users (includes both tracing and metrics).

@CptSchnitz
Copy link
Contributor

Shouldn't @opentelemetry/node and not @opentelemetry/sdk-node be installed if the tracing is initiated like this?

I initially imported node and tracing individually, but sdk-node was mentioned in the SIG meeting and seemed like a better candidate here, since it's meant to be a more wholesale package for Node users (includes both tracing and metrics).

i just looked at the readme for sdk-node and it seems like its initialization is much simpler compared to doing everything manually, maybe its better to adapt the quick start to use it.
https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-node/README.md

@dyladan
Copy link
Member

dyladan commented Jul 23, 2021

Shouldn't @opentelemetry/node and not @opentelemetry/sdk-node be installed if the tracing is initiated like this?

I initially imported node and tracing individually, but sdk-node was mentioned in the SIG meeting and seemed like a better candidate here, since it's meant to be a more wholesale package for Node users (includes both tracing and metrics).

i just looked at the readme for sdk-node and it seems like its initialization is much simpler compared to doing everything manually, maybe its better to adapt the quick start to use it.
https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-node/README.md

I would also support this. You can either update this PR or we can review and merge this (since it is an improvement) and do the sdk-node in a sparate PR. Up to you.

@vreynolds
Copy link
Contributor Author

Aha, I'm using it as a meta package, instead of utilizing the actual simplified setup. Got it, and agree that it would be better. Updating now.

* use sdk-node initializer
@vmarchaud vmarchaud requested a review from obecny July 24, 2021 14:39
@dyladan dyladan requested a review from rauno56 as a code owner July 26, 2021 19:11
@dyladan dyladan added the document Documentation-related label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
document Documentation-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add minimal setup to README
6 participants