Currently there are multiple places in the code that make the assumption that a Span has an attributes attribute, this is not always the case.
The solution could be to implement an attributes property on the Span interface, or we could implement a separate getter method.