-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Context Propagation: use simpler words and better examples #5677
Comments
Still there is room for using the simple words and better examples. |
thank you for your feedback @SrinivasuluCB |
In general, anything to do with Contexts is super confusing, even after having read some of the sdk impmentations. maybe concrete examples with nothing implicit. |
thanks for the additional feedback, @jdougan |
Thinking about it some more, a skeletal implementation in C89 (or something at a similar semantic level), where you have to implement contexts manually and pass them around explicitly would probably give a better idea of the desired data flow. /* C89 implementation */
// initialized elsewhere
TracerProvider tpRoot;
void exampleApiCall(ApiResult *apiResult)
{
// fns have output on the left of the empty comment, input on the
// right.
Tracer tr;
Context trCtx, innerCtx, outerCtx;
Span spanOuter, spanInner;
ApiQuery apiQuery;
getTracer(&tr, &trCtx,/**/ &tp, "example:ApiCall:");
startSpan(&spanOuter, &outerCtx,/**/ &trCtx, "outer-span-apicall");
setupApiCall(&apiquery, "queryString", &outerCtx);
startSpan(&spanInner, &innerCtx,/**/ &outSpanCtx, "inner-span-apicall");
someApiCall(apiResult, /**/ apiQuery, &innerCtx);
endSpan(&spanInner);
cleanupSpan(&spanInner);
teardownApiCall(&apiQuery, /**/ &outerCtx);
endSpan(&spanOuter);
cleanupSpan(&spanOuter);
cleanupTracer(&tr);
} |
We have some example code in the language specific documentation, e.g. https://opentelemetry.io/docs/languages/js/propagation/#manual-context-propagation We could copy from that, or link to it |
URL
https://opentelemetry.io/docs/concepts/context-propagation/
Description
Still there is room for using the simple words and better examples
The text was updated successfully, but these errors were encountered: