api: update the tracer api by dmehala · Pull Request #131 · DataDog/dd-trace-cpp
Description
Update the API:
extract_or_create_spanalways returns a span, either the extracted one or a new span if the extraction fail.override_sampling_priorityacceptsSamplingPriority.
Motivation
create_span always returns a span, while extract_span may or may not return a span. Logically, one can think the behavior of extract_or_create_span should first attempt to extract_span, and if the extraction fails, it should then call create_span. At least, that's what the name of the function suggest and I think the desired behavior.
The other one is for simplicity's sake.