* Remove python AppInsights telemetry.

Removing since this path is not yet implemented, and
the implementation needs additional work to prevent sending
extra data, such as the computer name.

* Make sure to not send any instance names or IP addresses in telemetry.
This commit is contained in:
marina-p 2020-10-26 10:46:56 -07:00 коммит произвёл GitHub
Родитель 6b02a33bbd
Коммит 897e979b96
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 9 добавлений и 37 удалений

Просмотреть файл

@ -25,7 +25,6 @@ import atexit
from threading import Thread
import utils.logger as logger
import utils.telemetry as telemetry
import engine.dependencies as dependencies
import engine.core.preprocessing as preprocessing
import engine.core.postprocessing as postprocessing
@ -175,11 +174,6 @@ def signal_handler(sig, frame):
if __name__ == '__main__':
telemetry.restler_telemetry.restler_started('Restler 5.0.3', 'Restler task IDK', 'execution id : 123', {'feature1': 'true', 'feature2': 'false'})
atexit.register(
lambda: telemetry.restler_telemetry.flush()
)
# the following intercepts Ctrl+C (tested on Windows only! but should work on Linux)
# the next line works in powershell (but not in bash on Windows!)
signal.signal(signal.SIGINT, signal_handler)

Просмотреть файл

@ -1,30 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
""" Telemetry module. """
from applicationinsights import TelemetryClient
#Instrumentation key is from app insights resource in Azure Portal
instrumentation_key = '6a4d265f-98cd-432f-bfb9-18ced4cd43a9'
class RestlerTelemetryClient():
def __init__(self, machine_id):
self.__telemetry_client = TelemetryClient(instrumentation_key)
self.__machine_id = machine_id
def restler_started(self, version, task, execution_id, features_list):
properties = {
'machineId' : machine_id,
'version' : version,
'executionId' : execution_id,
'task' : task
}
self.__telemetry_client.track_event(
'restler started', {**properties, **features_list})
def flush(self):
self.__telemetry_client.flush()
machine_id = "0000-00-0000"
restler_telemetry = RestlerTelemetryClient(machine_id)

Просмотреть файл

@ -7,7 +7,15 @@ module Restler.Telemetry
let [<Literal>] InstrumentationKey = "6a4d265f-98cd-432f-bfb9-18ced4cd43a9"
type TelemetryClient(machineId: System.Guid, instrumentationKey: string) =
let client = Microsoft.ApplicationInsights.TelemetryClient(new Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration(instrumentationKey))
let client =
let c = Microsoft.ApplicationInsights.TelemetryClient(
new Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration(instrumentationKey))
// Make sure to not send any instance names or IP addresses
// These must be non-empty strings to override sending the values obtained by the framework
c.Context.Cloud.RoleName <- "none"
c.Context.Cloud.RoleInstance <- "none"
c.Context.Location.Ip <- "0.0.0.0"
c
member __.RestlerStarted(version, task, executionId, featureList) =
client.TrackEvent("restler started",