opentelemetry-js
opentelemetry-js copied to clipboard
docs: update otlp exporter example to use recommended patterns
trafficstars
Which problem is this PR solving?
The example has numerous issues that this PR addresses:
- our collector image and config is outdated
- we're using non-recommended patterns in the example, which people may copy and get confused about
- we're not registering shutdown listeners in the example, which causes problems
- we're not really explaining why we're doing the things we're doing, which often leads to questions
I'll gradually update all other examples to a similar pattern too.
Fixes #5602
How Has This Been Tested?
- [x] Manual testing
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 94.95%. Comparing base (4f9b31b) to head (f4322f4).
:warning: Report is 180 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5605 +/- ##
=======================================
Coverage 94.95% 94.95%
=======================================
Files 309 309
Lines 7946 7946
Branches 1608 1608
=======================================
Hits 7545 7545
Misses 401 401
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.