Description
I'm trying to implement a sort of shim layer that takes tracing information in a proprietary format and convert it to OTel. Thus, I can't instrument my code in the normal OTel way. I have currently hacked together a solution where I directly instantiate SpanContexts and Spans from the SDK. It's slightly messy and I'm afraid of using things that seem internal, however I found no other way of achieving what I want.
Originally I was using the higher level API with a tracer object and calling start_span on that, however, it doesn't allow me to feed in the trace_id or span_id. I have that information from the source data, so I have to propagate it. Using the internal objects was the only way I found to do that.
Does anyone have any guidance? Should I continue to use the internal objects and risk breakage on new releases?
Or should perhaps the tracer start_span method take optional arguments for trace_id and span_id? If so, I could open a feature enhancement issue for that.