-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
telemetry: Add billing categorization to cody events 2 (#2345)
Adds billing metadata to some events per RFC 978: https://docs.google.com/document/d/1EvyH1kaU-fsn59h-DyoaO2Qy4C2TYLmDGjG73bdb2V4/edit#heading=h.trqab8y0kufp follow on to sourcegraph/cody#5493 and sourcegraph/sourcegraph#529 ## Test plan CI --------- Co-authored-by: Dan Adler <5589410+dadlerj@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
73 additions
and
8 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/main/java/com/sourcegraph/cody/agent/protocol/TelemetryEventParameters.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
package com.sourcegraph.cody.agent.protocol | ||
|
||
enum class BillingProduct { | ||
CODY | ||
} | ||
|
||
enum class BillingCategory { | ||
CORE, | ||
BILLABLE | ||
} | ||
|
||
data class BillingMetadata(val product: BillingProduct, val category: BillingCategory) | ||
|
||
data class TelemetryEventParameters( | ||
val version: Long? = null, | ||
val interactionID: String? = null, | ||
val metadata: Map<String, Long>? = null, | ||
val billingMetadata: BillingMetadata? = null, | ||
val privateMetadata: Map<String, String>? = null, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters