span object as an argument. Access attributes through span.Attributes. Individual attributes might be missing, so use GetValueOrDefault():
Default attributes
The following attributes are useful for common callback decisions. The list is not exhaustive.
Note that
http.response.status_code is a long, not an int. Pattern matching with is int doesn’t match it.
Set custom attributes
Use theSetRequestAttribute() method of the IApitally service 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.