span object as an argument. Access attributes through span.Attributes(), and create an attribute.Set to look them up by key. Individual attributes might be missing, in which case Value() returns false as its second value:
Default attributes
The following attributes are useful for common callback decisions. The list is not exhaustive.
Attributes marked with * are available to
SampleOnRequest when the request starts.
Read string attributes with AsString() and int64 attributes with AsInt64(). Both return the zero value for missing attributes.
Set custom attributes
Useapitally.SetRequestAttributes() with the request context in your request handling code to attach custom metadata to the current request span. These attributes are included in the request trace and available to response-stage sampling and masking callbacks.