Skip to content

telemetry: add metrics for pinned context #1051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,26 @@
"type": "string",
"description": "Unique identifier for each message in an conversation"
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make these fields more generic like codeCount, fileCount etc to make it reusable?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that the metrics are specific to pinned context feature, we want to understand how the customers use this new feature.

What are purpose of the generic metrics codeCount, fileCount?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The names of the types im adding use the same naming convention as the existing context count types:

"name": "cwsprChatPromptContextCount",

except with the added prefix Pinned

this way we can keep track which context items were added in the prompt vs which were pinned

"name": "cwsprChatPinnedCodeContextCount",
"type": "int",
"description": "Number of pinned code symbols added to context"
},
{
"name": "cwsprChatPinnedFileContextCount",
"type": "int",
"description": "Number of pinned files added to context"
},
{
"name": "cwsprChatPinnedFolderContextCount",
"type": "int",
"description": "Number of pinned folders added to context"
},
{
"name": "cwsprChatPinnedPromptContextCount",
"type": "int",
"description": "Number of pinned saved prompts added to context"
},
{
"name": "cwsprChatProgrammingLanguage",
"type": "string",
Expand Down Expand Up @@ -1218,7 +1238,7 @@
{
"name": "cwsprChatRuleContextCount",
"type": "int",
"description": "Number of workspace rules automatically added to context"
"description": "Number of workspace rules automatically added to context (does not include inactive rules)"
},
{
"name": "cwsprChatRuleContextLength",
Expand Down Expand Up @@ -1265,6 +1285,11 @@
"type": "int",
"description": "Total number of code blocks inside a message in the conversation."
},
{
"name": "cwsprChatTotalRuleContextCount",
"type": "int",
"description": "Total number of workspace rules (both active and inactive)"
},
{
"name": "cwsprChatTriggerInteraction",
"type": "string",
Expand Down Expand Up @@ -2413,6 +2438,22 @@
{
"type": "cwsprChatMessageId"
},
{
"type": "cwsprChatPinnedCodeContextCount",
"required": false
},
{
"type": "cwsprChatPinnedFileContextCount",
"required": false
},
{
"type": "cwsprChatPinnedFolderContextCount",
"required": false
},
{
"type": "cwsprChatPinnedPromptContextCount",
"required": false
},
{
"type": "cwsprChatProgrammingLanguage",
"required": false
Expand Down Expand Up @@ -2485,6 +2526,10 @@
"type": "cwsprChatTimeToFirstUsableChunk",
"required": false
},
{
"type": "cwsprChatTotalRuleContextCount",
"required": false
},
{
"type": "cwsprChatTriggerInteraction"
},
Expand Down