Returns:
Retrieves the span name for the given object.
- object for which span name should be picked
- the default valued to be returned if span name can't be calculated
span name