-
Hi. Referring to https://opentelemetry-cpp.readthedocs.io/en/latest/api/GettingStarted.html#create-nested-spans According to documentation, the nested span's trace id is supposed to be inherited from the active span but when I tried to construct the nested span as in the documentation, it is not unless I pass the StartSpanOptions with the parent's context to StartSpan() the child span. Is the child span supposed to get the active span's trace id without passing options or did I miss something? Please advise. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Yes child span should inherit the trace id from parent. You can go through the nested span example here - https://github.com/open-telemetry/opentelemetry-cpp/blob/main/examples/simple/main.cc ( refer - call to |
Beta Was this translation helpful? Give feedback.
Can you please check and confirm if this patch fixes the issue - #1014 (comment).