Skip to content

Commit 0b20e83

Browse files
authored
Add a field to Event.dartMCPEvent to track plugin usage (#2538)
1 parent 3380098 commit 0b20e83

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎pkgs/unified_analytics/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 8.0.17
2+
- Added optional `agentPlugin` parameter to the `Event.dartMCPEvent` constructor to identify
3+
agent plugin usage.
4+
15
## 8.0.16
26

37
- Added `Event.packageSkillsEvent` to track events from package:skills.

‎pkgs/unified_analytics/lib/src/event.dart‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,11 +1088,15 @@ final class Event {
10881088
///
10891089
/// The [type] identifies the kind of event this is, and [additionalData] is
10901090
/// the actual data for the event.
1091+
///
1092+
/// The [agentPlugin] is optional and is the name of the agent plugin that is
1093+
/// using the MCP server.
10911094
Event.dartMCPEvent({
10921095
required String client,
10931096
required String clientVersion,
10941097
required String serverVersion,
10951098
required String type,
1099+
String? agentPlugin,
10961100
CustomMetrics? additionalData,
10971101
}) : this._(
10981102
eventName: DashEvent.dartMCPEvent,
@@ -1101,6 +1105,7 @@ final class Event {
11011105
'clientVersion': clientVersion,
11021106
'serverVersion': serverVersion,
11031107
'type': type,
1108+
'agentPlugin': ?agentPlugin,
11041109
...?additionalData?.toMap(),
11051110
},
11061111
);

0 commit comments

Comments
 (0)