Skip to content

fix(aws-lambda): BasicTracerProvider not force flushing #661

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

Conversation

longility
Copy link
Contributor

When the tracer provider is set, the type is a ProxyTracerProvider that proxies to the BasicTracerProvider. This unwraps and gets the delegate to attempt to force flush.

fixes #647

When the tracer provider is set, the type is a ProxyTracerProvider that proxies to the BasicTracerProvider. This unwraps and gets the delegate to attempt to force flush.
@codecov
Copy link

codecov bot commented Sep 15, 2021

Codecov Report

Merging #661 (9912a64) into main (7edf984) will decrease coverage by 0.37%.
The diff coverage is n/a.

❗ Current head 9912a64 differs from pull request most recent head 67efa0a. Consider uploading reports for the commit 67efa0a to get more accurate results

@@            Coverage Diff             @@
##             main     #661      +/-   ##
==========================================
- Coverage   96.82%   96.44%   -0.38%     
==========================================
  Files           9       14       +5     
  Lines         630     1210     +580     
  Branches      124      171      +47     
==========================================
+ Hits          610     1167     +557     
- Misses         20       43      +23     
Impacted Files Coverage Δ
...st/integrations/lambda-handler.force-flush.test.ts 96.66% <0.00%> (ø)
...strumentation-aws-lambda/test/lambda-test/async.js 100.00% <0.00%> (ø)
...nstrumentation-aws-lambda/test/lambda-test/sync.js 100.00% <0.00%> (ø)
...-instrumentation-aws-lambda/src/instrumentation.ts 90.84% <0.00%> (ø)
...ws-lambda/test/integrations/lambda-handler.test.ts 97.97% <0.00%> (ø)

@longility longility changed the title fix: BasicTracerProvider not force flushing fix(opentelemetry-instrumentation-aws-lambda): BasicTracerProvider not force flushing Sep 17, 2021
@longility longility changed the title fix(opentelemetry-instrumentation-aws-lambda): BasicTracerProvider not force flushing fix(aws-lambda): BasicTracerProvider not force flushing Sep 17, 2021
Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

@longility these comments should fix the unit tests (assuming no typos!)

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. One minor suggestion up to you

Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

Thanks @longility! It looks like there are some lint errors to fix quickly.

This will unblock #660. @Flarna please take a look when you get a chance.

@longility
Copy link
Contributor Author

Thanks @longility! It looks like there are some lint errors to fix quickly.

This will unblock #660. @Flarna please take a look when you get a chance.

I’m not at my desk so maybe at least two hours before I can get to it

@longility longility requested a review from dyladan September 20, 2021 21:21
@willarmiros
Copy link
Contributor

@Flarna is this ready for merge?

@Flarna
Copy link
Member

Flarna commented Sep 21, 2021

@willarmiros I have approved yes. Not sure about the general guidelines. At least in the past one or two of the otel-js maintainers had to approve but maybe this has changed in contrib repo.

@willarmiros
Copy link
Contributor

Ah I didn't see that @dyladan had been re-requested for a review nvm - my bad.

@longility
Copy link
Contributor Author

Ah I didn't see that @dyladan had been re-requested for a review nvm - my bad.

I figured I made enough changes for him to re-review to spot check. Sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I'm expecting node aws lambda to export spans properly
5 participants