Elastic APM by default uses the name of the Django view as the identifier of a transaction, combined with the request method. While this works well in general, it leads to confusing results with view sets from Django Rest Framework. It cobbles list and detail views together, as well as any custom actions you might have defined in your viewset.
You can work around this by adding the action of the viewset to the transaction name. Simply add the provided mixin to any view set:
class BooksViewSet(ViewSetTransactionNameMixin, viewsets.ModelViewSet):