Skip to content

Commit

Permalink
Fix telemetry not working (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
benank authored Jun 16, 2022
1 parent 6dc345e commit 2acaa93
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/extension/src/ActionHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def setup_telemetry(self):
# As this is a common function used by all handler actions, setting operation_id such that it will be the same timestamp for all handler actions, which can be used for identifying all events for an operation.
# NOTE: Enable handler action will set operation_id to activity_id from config settings. And the same will be used in Core.
self.telemetry_writer.set_operation_id(self.operation_id_substitute_for_all_actions_in_telemetry)
self.ext_env_handler.telemetry_supported = True
self.__log_telemetry_info(telemetry_supported=True, events_folder_previously_existed=events_folder_previously_existed)
else:
# This line only logs to file since events_folder_path is not set in telemetry_writer
Expand Down
1 change: 1 addition & 0 deletions src/extension/src/Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class ExitCode(EnumBackport):
HandlerFailed = 88
MissingConfig = 89
OperationNotSupported = 90
AutoAssessmentFailure = 91

class AgentEnvVarStatusCode(EnumBackport):
AGENT_ENABLED = "AGENT_ENABLED"
Expand Down
1 change: 0 additions & 1 deletion src/extension/src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def main(argv):
runtime_context_handler = RuntimeContextHandler(logger)
json_file_handler = JsonFileHandler(logger)
ext_env_handler = ExtEnvHandler(json_file_handler)
ext_env_handler.telemetry_supported = telemetry_writer.is_telemetry_supported()
env_health_manager = EnvHealthManager(env_layer)
if ext_env_handler.handler_environment_json is not None and ext_env_handler.config_folder is not None:
config_folder = ext_env_handler.config_folder
Expand Down

0 comments on commit 2acaa93

Please sign in to comment.