Hello community,

here is the log from the commit of package python-applicationinsights for 
openSUSE:Factory checked in at 2018-05-13 16:03:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-applicationinsights (Old)
 and      /work/SRC/openSUSE:Factory/.python-applicationinsights.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-applicationinsights"

Sun May 13 16:03:37 2018 rev:2 rq:601545 version:0.11.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-applicationinsights/python-applicationinsights.changes
    2017-10-26 18:46:17.174624537 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-applicationinsights.new/python-applicationinsights.changes
       2018-05-13 16:03:40.109388916 +0200
@@ -1,0 +2,8 @@
+Tue Apr 24 11:58:02 UTC 2018 - [email protected]
+
+- New upstream release
+  + Version 0.11.2
+  + Upstream changelog not available
+- Move LICENSE.txt from %doc to %license section
+
+-------------------------------------------------------------------

Old:
----
  applicationinsights-0.11.1.tar.gz

New:
----
  applicationinsights-0.11.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-applicationinsights.spec ++++++
--- /var/tmp/diff_new_pack.uCpN6l/_old  2018-05-13 16:03:41.013355936 +0200
+++ /var/tmp/diff_new_pack.uCpN6l/_new  2018-05-13 16:03:41.017355791 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-applicationinsights
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,9 +15,10 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-applicationinsights
-Version:        0.11.1
+Version:        0.11.2
 Release:        0
 Summary:        Microsoft Application Insights for Python
 License:        MIT
@@ -54,7 +55,8 @@
 
 %files %{python_files}
 %defattr(-,root,root,-)
-%doc LICENSE.txt README.md
+%doc README.md
+%license LICENSE.txt
 %{python_sitelib}/*
 
 %changelog

++++++ applicationinsights-0.11.1.tar.gz -> applicationinsights-0.11.2.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applicationinsights-0.11.1/PKG-INFO 
new/applicationinsights-0.11.2/PKG-INFO
--- old/applicationinsights-0.11.1/PKG-INFO     2017-09-07 02:48:35.000000000 
+0200
+++ new/applicationinsights-0.11.2/PKG-INFO     2018-03-15 01:10:04.000000000 
+0100
@@ -1,12 +1,13 @@
 Metadata-Version: 1.1
 Name: applicationinsights
-Version: 0.11.1
+Version: 0.11.2
 Summary: This project extends the Application Insights API surface to support 
Python.
-Home-page: https://github.com/Microsoft/AppInsights-Python
+Home-page: https://github.com/Microsoft/ApplicationInsights-Python
 Author: Microsoft
 Author-email: [email protected]
 License: MIT
-Download-URL: https://github.com/Microsoft/AppInsights-Python
+Download-URL: https://github.com/Microsoft/ApplicationInsights-Python
+Description-Content-Type: UNKNOWN
 Description: Application Insights for Python
         ===============================
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applicationinsights-0.11.1/applicationinsights/channel/TelemetryChannel.py 
new/applicationinsights-0.11.2/applicationinsights/channel/TelemetryChannel.py
--- 
old/applicationinsights-0.11.1/applicationinsights/channel/TelemetryChannel.py  
    2017-09-07 02:48:19.000000000 +0200
+++ 
new/applicationinsights-0.11.2/applicationinsights/channel/TelemetryChannel.py  
    2018-03-15 01:05:24.000000000 +0100
@@ -12,7 +12,7 @@
 
 # set up internal context
 internal_context = contracts.Internal()
-internal_context.sdk_version = platform_moniker + ':0.11.1'
+internal_context.sdk_version = platform_moniker + ':0.11.2'
 
 class TelemetryChannel(object):
     """The telemetry channel is responsible for constructing a 
:class:`contracts.Envelope` object from the passed in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applicationinsights-0.11.1/applicationinsights/django/middleware.py 
new/applicationinsights-0.11.2/applicationinsights/django/middleware.py
--- old/applicationinsights-0.11.1/applicationinsights/django/middleware.py     
2017-09-07 02:48:19.000000000 +0200
+++ new/applicationinsights-0.11.2/applicationinsights/django/middleware.py     
2018-03-15 01:05:24.000000000 +0100
@@ -127,8 +127,9 @@
         context.user.user_agent = request.META.get('HTTP_USER_AGENT', '')
 
         # User
-        if request.user is not None and not request.user.is_anonymous and 
request.user.is_authenticated:
-            context.user.account_id = request.user.get_short_name()
+        if hasattr(request, 'user'):
+            if request.user is not None and not request.user.is_anonymous and 
request.user.is_authenticated:
+                context.user.account_id = request.user.get_short_name()
 
         # Run and time the request
         addon.start_stopwatch()
@@ -136,19 +137,21 @@
 
     # Pre-1.10 handler
     def process_response(self, request, response):
-        addon = request.appinsights
-        duration = addon.measure_duration()
+        if hasattr(request, 'appinsights'):
+            addon = request.appinsights
+            duration = addon.measure_duration()
+
+            data = addon.request
+            context = addon.context
+
+            # Fill in data from the response
+            data.duration = addon.measure_duration()
+            data.response_code = response.status_code
+            data.success = response.status_code < 400 or response.status_code 
== 401
 
-        data = addon.request
-        context = addon.context
+            # Submit and return
+            self._client.channel.write(data, context)
 
-        # Fill in data from the response
-        data.duration = addon.measure_duration()
-        data.response_code = response.status_code
-        data.success = response.status_code < 400 or response.status_code == 
401
-
-        # Submit and return
-        self._client.channel.write(data, context)
         return response
 
     # 1.10 and up...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applicationinsights-0.11.1/applicationinsights/requests/WSGIApplication.py 
new/applicationinsights-0.11.2/applicationinsights/requests/WSGIApplication.py
--- 
old/applicationinsights-0.11.1/applicationinsights/requests/WSGIApplication.py  
    2017-09-07 02:48:19.000000000 +0200
+++ 
new/applicationinsights-0.11.2/applicationinsights/requests/WSGIApplication.py  
    2018-03-15 01:05:24.000000000 +0100
@@ -1,5 +1,6 @@
 import datetime
 import re
+import uuid
 import applicationinsights
 
 class WSGIApplication(object):
@@ -42,6 +43,7 @@
             queue = applicationinsights.channel.AsynchronousQueue(sender)
             telemetry_channel = 
applicationinsights.channel.TelemetryChannel(None, queue)
         self.client = applicationinsights.TelemetryClient(instrumentation_key, 
telemetry_channel)
+        self.client.context.device.type = "PC"
         self._wsgi_application = wsgi_application
 
     def flush(self):
@@ -62,6 +64,11 @@
         start_time = datetime.datetime.utcnow()
         name = environ.get('PATH_INFO') or '/'
         closure = {'status': '200 OK'}
+        http_method = environ.get('REQUEST_METHOD', 'GET')
+
+        self.client.context.operation.id = str(uuid.uuid4())
+        # operation.parent_id ought to be the request id (not the operation 
id, but we don't have it yet)
+        self.client.context.operation.name = http_method + ' ' + name
 
         def status_interceptor(status_string, headers_array, exc_info=None):
             closure['status'] = status_string
@@ -80,7 +87,6 @@
             response_code = closure['status']
             success = False
             
-        http_method = environ.get('REQUEST_METHOD', 'GET')
         url = name
         query_string = environ.get('QUERY_STRING')
         if query_string:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/applicationinsights-0.11.1/applicationinsights.egg-info/PKG-INFO 
new/applicationinsights-0.11.2/applicationinsights.egg-info/PKG-INFO
--- old/applicationinsights-0.11.1/applicationinsights.egg-info/PKG-INFO        
2017-09-07 02:48:34.000000000 +0200
+++ new/applicationinsights-0.11.2/applicationinsights.egg-info/PKG-INFO        
2018-03-15 01:10:04.000000000 +0100
@@ -1,12 +1,13 @@
 Metadata-Version: 1.1
 Name: applicationinsights
-Version: 0.11.1
+Version: 0.11.2
 Summary: This project extends the Application Insights API surface to support 
Python.
-Home-page: https://github.com/Microsoft/AppInsights-Python
+Home-page: https://github.com/Microsoft/ApplicationInsights-Python
 Author: Microsoft
 Author-email: [email protected]
 License: MIT
-Download-URL: https://github.com/Microsoft/AppInsights-Python
+Download-URL: https://github.com/Microsoft/ApplicationInsights-Python
+Description-Content-Type: UNKNOWN
 Description: Application Insights for Python
         ===============================
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/applicationinsights-0.11.1/setup.py 
new/applicationinsights-0.11.2/setup.py
--- old/applicationinsights-0.11.1/setup.py     2017-09-07 02:48:19.000000000 
+0200
+++ new/applicationinsights-0.11.2/setup.py     2018-03-15 01:05:24.000000000 
+0100
@@ -14,14 +14,14 @@
     # Versions should comply with PEP440.  For a discussion on single-sourcing
     # the version across setup.py and the project code, see
     # http://packaging.python.org/en/latest/tutorial.html#version
-    version='0.11.1',
+    version='0.11.2',
 
     description='This project extends the Application Insights API surface to 
support Python.',
     long_description=long_description,
 
     # The project's main homepage.
-    url='https://github.com/Microsoft/AppInsights-Python',
-    download_url='https://github.com/Microsoft/AppInsights-Python',
+    url='https://github.com/Microsoft/ApplicationInsights-Python',
+    download_url='https://github.com/Microsoft/ApplicationInsights-Python',
 
     # Author details
     author='Microsoft',


Reply via email to