Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package azure-cli-telemetry for openSUSE:Factory checked in at 2022-09-20 19:23:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/azure-cli-telemetry (Old) and /work/SRC/openSUSE:Factory/.azure-cli-telemetry.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-telemetry" Tue Sep 20 19:23:27 2022 rev:8 rq:1004116 version:1.0.8 Changes: -------- --- /work/SRC/openSUSE:Factory/azure-cli-telemetry/azure-cli-telemetry.changes 2022-08-05 19:51:41.737563283 +0200 +++ /work/SRC/openSUSE:Factory/.azure-cli-telemetry.new.2083/azure-cli-telemetry.changes 2022-09-20 19:23:33.062468427 +0200 @@ -1,0 +2,8 @@ +Fri Sep 16 09:38:00 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- New upstream release + + Version 1.0.8 + + For detailed information about changes see the + HISTORY.rst file provided with this package + +------------------------------------------------------------------- Old: ---- azure-cli-telemetry-1.0.7.tar.gz New: ---- azure-cli-telemetry-1.0.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ azure-cli-telemetry.spec ++++++ --- /var/tmp/diff_new_pack.Up7tQ6/_old 2022-09-20 19:23:33.506469701 +0200 +++ /var/tmp/diff_new_pack.Up7tQ6/_new 2022-09-20 19:23:33.514469724 +0200 @@ -17,7 +17,7 @@ Name: azure-cli-telemetry -Version: 1.0.7 +Version: 1.0.8 Release: 0 Summary: Microsoft Azure CLI Telemetry Package License: MIT ++++++ azure-cli-telemetry-1.0.7.tar.gz -> azure-cli-telemetry-1.0.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-telemetry-1.0.7/HISTORY.rst new/azure-cli-telemetry-1.0.8/HISTORY.rst --- old/azure-cli-telemetry-1.0.7/HISTORY.rst 2022-07-29 05:25:38.000000000 +0200 +++ new/azure-cli-telemetry-1.0.8/HISTORY.rst 2022-09-02 07:40:04.000000000 +0200 @@ -2,6 +2,10 @@ Release History =============== +1.0.8 ++++++ +* Keep storing telemetry to CLI AppInsights in local cache but send telemetry to other AppInsights immediately + 1.0.7 +++++ * Support specifying `telemetry.push_interval_in_hours` to force push telemetry cache file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-telemetry-1.0.7/PKG-INFO new/azure-cli-telemetry-1.0.8/PKG-INFO --- old/azure-cli-telemetry-1.0.7/PKG-INFO 2022-07-29 05:25:53.418673000 +0200 +++ new/azure-cli-telemetry-1.0.8/PKG-INFO 2022-09-02 07:40:14.638116800 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-cli-telemetry -Version: 1.0.7 +Version: 1.0.8 Summary: Microsoft Azure CLI Telemetry Package Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation @@ -33,6 +33,10 @@ Release History =============== +1.0.8 ++++++ +* Keep storing telemetry to CLI AppInsights in local cache but send telemetry to other AppInsights immediately + 1.0.7 +++++ * Support specifying `telemetry.push_interval_in_hours` to force push telemetry cache file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-telemetry-1.0.7/azure/cli/telemetry/__init__.py new/azure-cli-telemetry-1.0.8/azure/cli/telemetry/__init__.py --- old/azure-cli-telemetry-1.0.7/azure/cli/telemetry/__init__.py 2022-07-29 05:25:38.000000000 +0200 +++ new/azure-cli-telemetry-1.0.8/azure/cli/telemetry/__init__.py 2022-09-02 07:40:04.000000000 +0200 @@ -10,7 +10,9 @@ from azure.cli.telemetry.util import save_payload -__version__ = "1.0.6" +__version__ = "1.0.8" + +DEFAULT_INSTRUMENTATION_KEY = 'c4395b75-49cc-422c-bc95-c7d51aef5d46' def _start(config_dir): @@ -46,10 +48,34 @@ def save(config_dir, payload): from azure.cli.telemetry.util import should_upload + from azure.cli.telemetry.components.telemetry_client import CliTelemetryClient from azure.cli.telemetry.components.telemetry_logging import get_logger - if save_payload(config_dir, payload) and should_upload(config_dir): - logger = get_logger('main') + logger = get_logger('main') + try: + # Split payload to cli events and extra events by instrumentation key + # cli events should be stored in local cache and sent together + # extra events can be sent immediately + import json + events = json.loads(payload) + + logger.info('Begin splitting cli events and extra events, total events: %s', len(events)) + cli_events = {} + client = CliTelemetryClient() + for key, event in events.items(): + if key == DEFAULT_INSTRUMENTATION_KEY: + cli_events[key] = event + else: + extra_event = {key: event} + client.add(json.dumps(extra_event), flush=True) + client.flush(force=True) + cli_payload = json.dumps(cli_events) if cli_events else None + logger.info('Finish splitting cli events and extra events, cli events: %s', len(cli_events)) + except Exception as ex: # pylint: disable=broad-except + logger.info("Split cli events and extra events failure: %s", str(ex)) + cli_payload = payload + + if save_payload(config_dir, cli_payload) and should_upload(config_dir): logger.info('Begin creating telemetry upload process.') _start(config_dir) logger.info('Finish creating telemetry upload process.') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-telemetry-1.0.7/azure_cli_telemetry.egg-info/PKG-INFO new/azure-cli-telemetry-1.0.8/azure_cli_telemetry.egg-info/PKG-INFO --- old/azure-cli-telemetry-1.0.7/azure_cli_telemetry.egg-info/PKG-INFO 2022-07-29 05:25:53.000000000 +0200 +++ new/azure-cli-telemetry-1.0.8/azure_cli_telemetry.egg-info/PKG-INFO 2022-09-02 07:40:14.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-cli-telemetry -Version: 1.0.7 +Version: 1.0.8 Summary: Microsoft Azure CLI Telemetry Package Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation @@ -33,6 +33,10 @@ Release History =============== +1.0.8 ++++++ +* Keep storing telemetry to CLI AppInsights in local cache but send telemetry to other AppInsights immediately + 1.0.7 +++++ * Support specifying `telemetry.push_interval_in_hours` to force push telemetry cache file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-telemetry-1.0.7/setup.py new/azure-cli-telemetry-1.0.8/setup.py --- old/azure-cli-telemetry-1.0.7/setup.py 2022-07-29 05:25:38.000000000 +0200 +++ new/azure-cli-telemetry-1.0.8/setup.py 2022-09-02 07:40:04.000000000 +0200 @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup -VERSION = "1.0.7" +VERSION = "1.0.8" CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable',