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

feat: remove injection options #312

Merged
merged 20 commits into from
Oct 4, 2021

Conversation

rauno56
Copy link
Contributor

@rauno56 rauno56 commented Sep 27, 2021

Description

  • POR-9619

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Added automated tests
  • Unit tests have been added/updated
  • Documentation has been updated
  • Change file has been generated (npm run change:new)
  • Delete this branch (after the PR is merged)

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2021

Codecov Report

Merging #312 (ba9d890) into main (2df498f) will increase coverage by 1.00%.
The diff coverage is 93.33%.

❗ Current head ba9d890 differs from pull request most recent head db2b32e. Consider uploading reports for the commit db2b32e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
+ Coverage   92.81%   93.82%   +1.00%     
==========================================
  Files          10       10              
  Lines         348      340       -8     
  Branches       90       88       -2     
==========================================
- Hits          323      319       -4     
+ Misses         25       21       -4     
Impacted Files Coverage Δ
src/options.ts 98.88% <ø> (-0.03%) ⬇️
src/instrumentations/logging.ts 90.47% <92.85%> (+12.69%) ⬆️
src/tracing.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2df498f...db2b32e. Read the comment docs.

@rauno56 rauno56 force-pushed the feat/remove-injection-options branch from b82e206 to cdecf55 Compare September 30, 2021 13:50
@rauno56 rauno56 marked this pull request as ready for review September 30, 2021 14:21
@rauno56 rauno56 requested review from a team as code owners September 30, 2021 14:21
span.end();

setTimeout(() => {
// wait for the spans to be flushed
Copy link
Contributor

Choose a reason for hiding this comment

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

what about ForceFlush? spec implementation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our SDK currently doesn't provide access to the NodeTracerProvider we initialize.
#331

Copy link
Contributor

Choose a reason for hiding this comment

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

What about using API to get the global one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That currently gives us ProxyTracerProvider, which doesn't have forceFlush either and has NTP under private property. I don't have a full understanding of the correct way to solve this situation and that's why I'd like to leave it for now and figure it out after the next release.

@@ -54,32 +63,83 @@ describe('log injection', () => {

describe('default flow', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a test for disabled log injection?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR removes the option to toggle it. There's already a test for testing overwriting the default.

@jtmal-signalfx
Copy link
Contributor

I unchecked the "documentation is done", because there's this sentence in the README:

If log injection is enabled, the corresponding logging library package must be installed beforehand.

it needs to be reworded, right?

…lunk-otel-js into feat/remove-injection-options
@rauno56
Copy link
Contributor Author

rauno56 commented Oct 1, 2021

I unchecked the "documentation is done", because there's this sentence in the README:

If log injection is enabled, the corresponding logging library package must be installed beforehand.

it needs to be reworded, right?

Yes, reworded it. Perhaps we want to remove it from the main readme altogether, @theletterf? There's more info in docs/correlate-logs-traces.md.

@theletterf
Copy link
Contributor

@rauno56 Fine by me!

@rauno56 rauno56 merged commit 0347c10 into signalfx:main Oct 4, 2021
@rauno56 rauno56 deleted the feat/remove-injection-options branch October 4, 2021 10:13
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.

4 participants