Objects do not propagate across parfor, need save/load methods
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- distributed-systems, observability
Research direction
Start with opentelemetry.trace.Tracer/startSpan, especially the reported failure at line 125, and review how the global singleton proxymanager handles proxies across parfor workers. Investigate the custom save/load methods requested for objects and their C++ counterparts. Done means the tracer and related objects propagate through the shown parfor example without the Unknown proxy ID 3 error.
Written by the indexing model from the issue text.
Description
The following code would fail:
tr = opentelemetry.trace.getTracer("parfor_example");
sp = startSpan(tr, "main function");
...
parfor i = 1:8
% start a span for this iteration, using the tracer “tr” from main function
sp_i = startSpan(tr, "Iteration" + i);
...
end
Since tr is used both in and outside of the parfor block, parfor would copy and send it to the workers. Running this code would result in this error:
Error using . (line 63)
Unknown proxy ID 3
Error in opentelemetry.trace.Tracer/startSpan (line 125)
id = obj.Proxy.startSpan(spname, contextid, spankind, starttime, ...
This is because the global singleton proxymanager is not copied. In the workers, the proxies only exist in MATLAB but not in C++.
To make objects correctly propagate through to parfor blocks, they need to implement custom save/load methods which should also save/load their C++ counterparts.
- Dominant language
- MATLAB
- Stars
- 19
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mathworks/OpenTelemetry-MATLAB
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
documentation
mathworks/OpenTelemetry-MATLAB#248 · 1 assignee ·
-
test
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
otel-cpp changes
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
enhancement
mathworks/OpenTelemetry-MATLAB#242 · 1 comment · 1 assignee ·
All issues in mathworks/OpenTelemetry-MATLAB
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Documentation Good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
flatironinstitute/numbl#65 ·
-
Component: Continuous Integration Component: MATLAB Type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100