Skip to content

Commit 2f59c5b

Browse files
committed
keep user feedback and model in telemetry
1 parent 1097b11 commit 2f59c5b

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/aks-agent/azext_aks_agent/_consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"diagnostic data, to help improve Microsoft products and services. Processing of feedback data is governed by "
1616
"the Microsoft Products and Services Data Protection Addendum between your organization and Microsoft, and the "
1717
"feedback you submit is considered Personal Data under that addendum. "
18-
"[link=https://go.microsoft.com/fwlink/?LinkId=521839]Privacy Statement[/link]"
18+
"Privacy Statement: https://go.microsoft.com/fwlink/?LinkId=521839"
1919
)
2020
# Holmesgpt leverages prometheus_api_client for prometheus toolsets and introduces bz2 library.
2121
# Before libbz2-dev is bundled into azure cli python by https://github.com/Azure/azure-cli/pull/32163,

src/aks-agent/azext_aks_agent/agent/telemetry.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,18 @@ def _get_application_insights_instrumentation_key(self) -> str:
8282

8383
def track_agent_feedback(self, feedback):
8484
# NOTE: We should try to avoid importing holmesgpt at the top level to prevent dependency issues
85-
from holmes.core.feedback import Feedback
85+
from holmes.core.feedback import Feedback, FeedbackMetadata
8686

8787
# Type hint validation for development purposes
8888
if not isinstance(feedback, Feedback):
8989
raise TypeError(f"Expected Feedback object, got {type(feedback)}")
9090

91-
self.track("AgentCLIFeedback", properties={"feedback": json.dumps(feedback.to_dict())})
91+
# Before privacy team's approval for other user data, we keep only direct user feedback, and model info.
92+
feedback_filtered = Feedback()
93+
feedback_filtered.user_feedback = feedback.user_feedback
94+
feedback_metadata = FeedbackMetadata()
95+
feedback_metadata.model = feedback.metadata.model
96+
feedback_filtered.metadata = feedback_metadata
97+
self.track("AgentCLIFeedback", properties={"feedback": json.dumps(feedback_filtered.to_dict())})
9298
# Flush the telemetry data immediately to avoid too much data being sent at once
9399
self.flush()

0 commit comments

Comments
 (0)