-
Notifications
You must be signed in to change notification settings - Fork 619
chore!: update to JS SDK 2.x #2738
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
Merged
Merged
Changes from 90 commits
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
f21374e
chore!: update to JS SDK 2.x
trentm 196af25
instr-pino
trentm 857166f
bump engines.node to new min (same as for core repo)
trentm 3f608cf
drop testing node 14 and 16 for test-all-versions in CI as well
trentm 2536765
contrib-test-utils, instrumentation-fastify
trentm 1c396e6
drop CI testing of Node.js v23; that can be handled separately (see h…
trentm 68a965f
instr-kafkajs
trentm a909c2f
fix lint for contrib-test-utils
trentm aeba686
instr-router
trentm 8e0db93
instr-socket.io
trentm c595cae
fix lint for instr-fastify
trentm 59cf3ab
instr-undici
trentm 3455906
instr-mongoose
trentm 4e25644
instr-mysql
trentm c59311b
instr-mysql2
trentm 5e6795f
instrumentation-cassandra-driver
trentm 92f08e8
instr-express
trentm 45a8d24
instr-tedious
trentm f8ff8f5
instr-redis-4
trentm a4340eb
instr-lru-memoizer
trentm 91f660d
instr-mongodb
trentm bc48513
instr-amqplib
trentm 75149a6
instr-koa
trentm 4b14191
instr-memcached
trentm 7cfb637
instr-ioredis
trentm b0c9be4
instr-hapi
trentm 0809b07
instr-pg
trentm f42472e
instr-aws-sdk
trentm 86a3039
lint:fix for instr-mongodb
trentm 89c288b
lint:fix for instr-aws-sdk
trentm a542287
syntax fix for instr-mysql
trentm e79ca80
instr-redis
trentm fc11a5a
resource-detector-container
trentm 41fa127
resource-detector-gcp
trentm 874223b
lint:fix
trentm 1b1088c
lint:fix
trentm 3f91296
resource-detector-azure
trentm 4777b71
resource-detector-alibaba-cloud
trentm 052aede
resource-detector-aws
trentm e6c5dba
resource-detector-instana
trentm ec39a25
lint:fix
trentm f8e5f39
auto-instrumentations-node
trentm d05078b
rm unused function
trentm a22039b
add missing devDep @opentelemetry/sdk-trace-base that was resulting i…
trentm 9b9ac23
bump to dev.1 release of the 2.x/0.200 packages
trentm 79f9cb1
missing dep for detector-instana
trentm 56e7936
instr-net
trentm 956afca
instr-dns
trentm 3d6393d
lint:fix
trentm b4fd769
instr-generic-pool
trentm c18d50a
instr-connect
trentm e6deeaa
instr-fs
trentm 43fefee
instr-dataloader
trentm b5c7e24
instr-knex
trentm af81042
disable expensive TAV tests while this PR is in draft
trentm 9ff500b
instr-cucumber
trentm 10769ef
instr-restify
trentm b419889
instr-winston
trentm 4afd69b
instr-nestjs-core
trentm 2762f09
instr-runtime-node
trentm cc8c92a
instr-aws-lambda
trentm 14200a6
instr-graphql
trentm 7d29fa5
instr-document-load (however, tests are broken and I don't know why)
trentm be39ec5
instr-runtime-node: forgot to bump engines.node
trentm 94cbd86
resource-detector-github
trentm d0c3cac
winston-transport
trentm 6ac0998
sql-common
trentm aa7d46b
propagation-utils
trentm c5f4217
redis-common
trentm b9ca473
host-metrics
trentm 0aa86a0
baggage-span-processor
trentm 08de3e1
id-generator-aws-xray
trentm 9e94114
propagator-aws-xray, propagator-aws-xray-lambda
trentm 89a97f1
propagator-ot-trace
trentm e65b04d
propagator-instana
trentm bee8915
auto-configuration-propagators
trentm c1a378e
instr-user-interaction
trentm 052563c
instr-long-task
trentm dc37f5f
plugin-react-load
trentm 145c5d1
update to [email protected], set ES2022 as new base target
trentm 8310118
lint:fix
trentm a891211
fix a test failure in instr-user-interaction
trentm 741ff2e
lint:fix
trentm 896a836
hack to attempt to grok the test hangs observed in CI
trentm b2cd322
fix a https://www.typescriptlang.org/tsconfig/#useDefineForClassField…
trentm 9a2f06a
some possible additional https://www.typescriptlang.org/tsconfig/#use…
trentm fabce63
fix mysql2 test failure resulting from attempting to mix dynamic-impo…
trentm 2e80939
restore full testing
trentm ba2bd08
Merge branch 'main' into tm-sdk2-attempt
trentm 2565aa0
update from dev.1 prerelease of otel core packages to rc.1
trentm 1145014
remove accidentally left .only in tests
trentm 5d2a1b5
fix tests for instr-document-load: presence of PerformanceResourceTim…
trentm d447c47
use TS compile-time `private` annotation on this internal method
trentm af04cd7
lint:fix for style; fix a lint warning about unused _config arg
trentm 86ec210
fix compile error, stemming from earlier lint fix :)
trentm 9cb5f76
bump deps to released 2.0.0 / 0.200.0 versions
trentm e3a689f
fix resource detectors to never have their async attribute promises r…
trentm eec7ce5
Merge branch 'main' into tm-sdk2-attempt
trentm 2bf52ff
try with a bigger timeout now that we are running all the resource de…
trentm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running some tests in Elastic's distribution I got an error of an unhandled promise rejection
In this detector and other that are doing async operations we have promises that need to be handled if they reject. I think is because now the
detectResourcesmethod from@opentelemetry/resourcesdoes defer the handling of the rejected ones. CheckingResourceImplconstructor we see values are kept but not handled untilwaitForAsyncAttributesis called (I think in exporters).We could solve it by being more eager on handling the async attributes in
ResourceImplor by handling all possible rejections in each detector. Doing the later means we should add a second callback function for each promised value in the attribs object. Something likeUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@david-luna Thanks! I'll have to update most of the res detectors in this PR for this.
Some notes:
@opentelemetry/[email protected]here. It doesn't adequately guard against a rejection in async resource attribute values anymore. I'll raise an issue (and perhaps PR) for this.@opentelemetry/[email protected], the burden is now on the Resource Detector author to never have its async attribute promises reject.@opentelemetry/resources,@opentelemetry/resource-detector-*, and@opentelemetry/auto-instrumentations-nodeshould catch this. My total guess is that there are no out-of-process tests for these, and that mocha has someuncaughtExceptionorunhandledRejectionprocess event handler that accidentally traps these.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@opentelemetry/resource-detector-*: At least for@opentelemetry/resource-detector-alibaba-cloudall the tests usingdetectResourceswould immediately (in the same tick) callresource?.waitForAsyncResources(), which results in the asynctry/catchin that method guarding against promise rejections in the async attrs.I have a coming test case that adds this before the
resource?.waitForAsyncResources():This triggers the error.
@opentelemetry/auto-instrumentations-node: Itsregister.test.tsdoes do an out of process test. However, it setsOTEL_NODE_RESOURCE_DETECTORS: 'none',hence no testing of async resource detection. With the following diff, the test fails:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened open-telemetry/opentelemetry-js#5539 for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed in commit e3a689f