Learn how to ett custom span names to traces in Langtrace. You can use the inject_additional_attributes
function to set custom span names to traces. This name will be appended to the operation name and will be identifed as the name of the span in the trace.
inject_additional_attributes
function to set custom span names to traces. This name will be appended to the operation name and will be identified as the name of the span in the trace.
Please see the example below to learn how to set custom span names to traces. Note that the key langtrace.span.name
is used to pass the custom span name to the trace.
langtrace.span.name
as key inside inject_additional_attributes
, custom span naming will not work