Unlike the Django integration for Application Insights, the Flask
integration currently is quite low-level: the developer has to add a
custom WSGI middleware and enable trace and exception logging
themselves.
A more common pattern for adding groups of new capabilities to Flask is
using custom extensions that initialize themselves against the Flask
application: http://flask.pocoo.org/docs/0.12/extensiondev/
As such, this commit adds a custom extension for Flask that enables a
developer to very easily add Application Insights integration to their
Flask application just by doing `AppInsights(app)`.
The extension enables:
- Request logging
- Trace logging
- Exception logging
* First draft of Django middleware. Add NullSender telemetry sender.
* Fixes after testing
* request.appinsights.client sends telemetry parented to request operation id
* Add tests for Django middleware; fix some bugs that arose
* Rev version
* Cleanup whitespace
* Add logging tests + fixes + django/python compatibility matrix in run_all_tests
* run_all_tests => all_tests
* Logging properly sets Trace severity level, client accepts severity level as an argument
* Add documentation for applicationinsights.django, fix toctree recursion error
* More docs, README
* Formatting
* Unnecessary imports
* Many more tests; test settings, fix some issues found in the process
* View argument code was repr'ing unicode objects in Python2
* Log URL as request name by default; make use_view_name an optional setting, off by default; record_view_arguments also off by default
* 401 should be considered successful
* log_exceptions=False will turn off exception logging. Test for null input before logging exceptions
* Change back to 0.10
* Remove debug_ikey and debug_endpoint since it's simple enough to set those up in settings.py manually
* Add explicit create_client factory function, documentation
* Add django tests to travis-ci config
* Wrong filename
* update Travis CI link
update to Travis CI link after github repo changes.
* Update README.md
* Fix dict type iterate issue
* Revert "Fix dict type iterate issue"
* Python supported versions in Requirements
Other changes
- Added tests to verify supported backwards compatibility case.
- Updated existing tests to use new instrumentation key set pattern.
- Updated documentation to reflect API changes.
Other changes in this version:
- Changed serialization mechanism to be json.dumps() based (instead of manual)
- Removed instance_version
- Type mapping moved to fields on the object to send instead of global mapping dictionary
- Removed uses of isinstance()
- Renamed methods, properties and fields to follow python guidelines:
- single leading _ for privates
- property and method names use _ separated names instead of camel case
- Changed track_exception() signature to be sys.exc_info() compatible (see .md file to sample usage)
- Properly serializing required fields