Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApmView's raises AttributeError when trying to get a view_name #9

Closed
leandrodesouzadev opened this issue Oct 31, 2022 · 3 comments · Fixed by #11
Closed

ApmView's raises AttributeError when trying to get a view_name #9

leandrodesouzadev opened this issue Oct 31, 2022 · 3 comments · Fixed by #11
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@leandrodesouzadev
Copy link
Contributor

Previous discussion #3

@leandrodesouzadev leandrodesouzadev added bug Something isn't working enhancement New feature or request labels Oct 31, 2022
@leandrodesouzadev leandrodesouzadev self-assigned this Oct 31, 2022
@leandrodesouzadev leandrodesouzadev linked a pull request Oct 31, 2022 that will close this issue
@NiklasMerz
Copy link
Contributor

I just tried version 0.2.0 and it works without errors. Thanks for this refactoring and new release!

I realized that the view name is no longer the real package name but views in my case got replaced with dj. Is this intentional?

image

@leandrodesouzadev
Copy link
Contributor Author

Hey @NiklasMerz!
Yeah that was intentional, now the "views" was stripped off. The naming will be:
For Django views: "app.dj.class_or_func_name"
For Drf views: "app.drf.class_or_func_name"

I think this will help separating them.

I'm now thinking that I haven't created a test case for a ViewSet. I'm won't be working today due to a holiday here in Brazil. Are you able to give a try using a DRF ViewSet?

@NiklasMerz
Copy link
Contributor

Alright that's fine for me. It tracks my important views perfectly fine.

I just added the ApmView mixin to a rest_framework viewset and it looks like the requests are not recorded. Class looks like this:

class ProjectViewSet(viewsets.ModelViewSet, ApmView):
    queryset = Project.objects.all()
    serializer_class = ProjectSerializer

Have a nice holiday. I wasn't working yesterday because of a holiday in Germany :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants