Overview
When you’re using the Langtrace SDK with any of the supported vendors, you can set custom span names to traces. This allows you to identify the span in the trace with a custom name. You can use theinject_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.
If you did not pass
langtrace.span.name
as key inside inject_additional_attributes
, custom span naming will not work