-
Notifications
You must be signed in to change notification settings - Fork 795
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
docs(context): Fix links, edit prose #2619
docs(context): Fix links, edit prose #2619
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2619 +/- ##
=======================================
Coverage 93.27% 93.27%
=======================================
Files 159 159
Lines 5444 5444
Branches 1141 1141
=======================================
Hits 5078 5078
Misses 366 366 |
|
||
### Limitations | ||
The former should be preferred over the latter as its implementation is substantially simpler than the latter's, and according to [Node.js docs](https://github.com/nodejs/node/blame/v17.1.0/doc/api/async_context.md#L42-L45), |
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.
AsyncLocalStorage isn't available for Node < 14.6 so we should document this there
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.
It is also available for node ^12.17 and node ^13.10
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.
According to the node 14 docs it was introduced in 13.10 so I think it is available in all v14 versions.
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.
Please note that AsyncLocalStorage
was added as experimental in 13.10 and it is still marked as experimental on 12 and 14 release lines (ignoring 13 and 15 for now as they are EOL anyway).
It was move out of experimental with 16.4.0.
There were several important fixes done in that area during the first 14.x releases resulting in using it only for >=14.8.0 in NodeTracerProvider
.
I think all these fixes were backported to the 12.x line but most likely not with 12.17.0.
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 this great work
@spencerwilson Can you please fix the conflict and run |
> While you can create your own implementation [of `AsyncLocalStorage`] on top of [`AsyncHook`], `AsyncLocalStorage` should be preferred as it is a performant and memory safe implementation that involves significant optimizations that are non-obvious to implement. | ||
|
||
`AsyncLocalStorage` is available in node `^12.17.0 || >= 13.10.0`, however `AsyncLocalStorageContextManager` is not enabled by default for node `<14.8.0` because of some important bugfixes which were introduced in `v14.8.0`. | ||
For more information see [nodejs/node#34573](https://github.com/nodejs/node/pull/34573). |
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 don't think this is the only relevant fix, it's the latest one.
Thanks for all the reviews, everyone. I'll try to get this mergeable in the next few days. |
@spencerwilson any update? |
@dyladan apologies, I didn't get this in last weekend and weekends are likely the only time I'll have to do OTel things. I'm going to try to get this mergeable tomorrow or Sunday. One question: Since my last commit I noticed that some Markdown docs in the JS repo(s?) are also published to opentelemetry.io (e.g., https://opentelemetry.io/docs/instrumentation/js/api/context/). Which type of links should I prefer to use in the Markdown: opentelemetry.io or github.com? |
website. the docs in the repo are actually meant to be deprecated and removed in favor of the website we just haven't gotten around to it yet |
Hrm, I was unable to run Markdown lint locally so I just went off of what I saw in the previous workflow logs. Had some trouble installing dependencies and lack experience with lerna to quickly know what's going on.
|
…y-js into sw/context-docs
A couple flaky tests, looks like:
I've merged
|
Flaky tests aren't your fault |
Which problem is this PR solving?
Short description of the changes
Type of change
Please delete options that are not relevant.
^ I take it that since the updated docs aren't deployed anywhere, there's no other step needed.
Checklist: