-
Notifications
You must be signed in to change notification settings - Fork 620
feat(detector-aws): add sync version for all detectors #2376
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
feat(detector-aws): add sync version for all detectors #2376
Conversation
…ce for lambda detector
…ce for beanstalk detector
…ce for ECS detector
…ce for EC2 detector
…ce for EKS detector
| import * as assert from 'assert'; | ||
| import * as sinon from 'sinon'; | ||
| import { awsBeanstalkDetector, AwsBeanstalkDetector } from '../../src'; | ||
| import { awsBeanstalkDetector, AwsBeanstalkDetectorSync } from '../../src'; |
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.
note for reviewer: awsBeanstalkDetector is delegating the job to awsBeanstalkDetectorSync so we need to apply the stubs into AwsBeanstalkDetectorSync class
| .resolves(JSON.stringify(data)); | ||
|
|
||
| const resource = await awsBeanstalkDetector.detect(); | ||
| await resource.waitForAsyncAttributes?.(); |
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.
note for reviewer: now awsBeanstalkDetector.detect() resolves to a promise before the async attributes are resolved so we need to await. You'll see the same change in other tests
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2376 +/- ##
==========================================
- Coverage 90.97% 90.51% -0.46%
==========================================
Files 146 155 +9
Lines 7492 7456 -36
Branches 1502 1535 +33
==========================================
- Hits 6816 6749 -67
- Misses 676 707 +31
|
blumamir
left a comment
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.
LGTM.
Thanks for merging all the package detectors into one PR 🙏
|
Error in |
Which problem is this PR solving?
As suggested by @blumamir this PR aggregates the previous PRs to add sync detectors in the
@opentelemetry/resource-detector-awspackage. Previous PRs will be closedShort description of the changes
DetectorSyncinterface.