Skip to content

Commit

Permalink
Merge pull request #60 from honeycombio/tredman.django-views
Browse files Browse the repository at this point in the history
[django] include view name in built-in django instrumentation
  • Loading branch information
tredman authored Feb 26, 2019
2 parents a1301d4 + f1323cf commit 8e43efb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions beeline/middleware/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ def create_http_event(self, request):
def process_exception(self, request, exception):
beeline.add_context_field("request.error_detail", beeline.internal.stringify_exception(exception))

def process_view(self, request, view_func, view_args, view_kwargs):
try:
beeline.add_context_field("django.view_func", view_func.__name__)
except AttributeError:
pass

class HoneyMiddlewareHttp(HoneyMiddlewareBase):
pass
Expand Down
2 changes: 1 addition & 1 deletion beeline/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '2.4.7'
VERSION = '2.5.0'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
setup(
python_requires='>=2.7',
name='honeycomb-beeline',
version='2.4.7',
version='2.5.0',
description='Honeycomb library for easy instrumentation',
url='https://github.com/honeycombio/beeline-python',
author='Honeycomb.io',
Expand Down

0 comments on commit 8e43efb

Please sign in to comment.