-
Notifications
You must be signed in to change notification settings - Fork 761
Replace telemetry backend with Devolutions OpenSearch #4561
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
01e6032
added the telemetry call in all the avalonia view
GabrielDuf d86cee0
telemetry
GabrielDuf a99d681
Fix for windows
GabrielDuf 64c4c45
revert comment
GabrielDuf 4d2a8e3
whiteSpace
GabrielDuf ba9b40a
made some change mentioned by copilot
GabrielDuf c77edee
fix wrong using order
GabrielDuf c3b515d
fixed multiple line
GabrielDuf d9d6975
fix wrong order of using
GabrielDuf 10aaefe
wip
GabrielDuf 5a55b15
missing SerializationHelpers.DefaultOptions
GabrielDuf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
67 changes: 67 additions & 0 deletions
67
src/UniGetUI.Interface.Telemetry/Events/TelemetryEventBase.cs
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace UniGetUI.Interface.Telemetry; | ||
|
|
||
| /// <summary> | ||
| /// Common fields shared by all UniGetUI telemetry events. | ||
| /// Mirrors the field names expected by the Devolutions OpenSearch schema. | ||
| /// </summary> | ||
| public abstract class TelemetryEventBase | ||
| { | ||
| protected TelemetryEventBase() | ||
| { | ||
| EventID = Guid.NewGuid().ToString(); | ||
| EventDate = DateTime.UtcNow; | ||
| } | ||
|
|
||
| [JsonPropertyName("eventID")] | ||
| public string EventID { get; set; } | ||
|
|
||
| [JsonPropertyName("eventDate")] | ||
| public DateTime EventDate { get; set; } | ||
|
|
||
| [JsonPropertyName("installID")] | ||
| public required string InstallID { get; set; } | ||
|
|
||
| [JsonPropertyName("locale")] | ||
| public string? Locale { get; set; } | ||
|
|
||
| [JsonPropertyName("application")] | ||
| public required TelemetryApplicationInfo Application { get; set; } | ||
|
|
||
| [JsonPropertyName("platform")] | ||
| public TelemetryPlatformInfo? Platform { get; set; } | ||
| } | ||
|
|
||
| public sealed class TelemetryApplicationInfo | ||
| { | ||
| [JsonPropertyName("name")] | ||
| public required string Name { get; set; } | ||
|
|
||
| [JsonPropertyName("version")] | ||
| public required string Version { get; set; } | ||
|
|
||
| [JsonPropertyName("dataSource")] | ||
| public required string DataSource { get; set; } | ||
|
|
||
| [JsonPropertyName("pricing")] | ||
| public required string Pricing { get; set; } | ||
|
|
||
| [JsonPropertyName("language")] | ||
| public string? Language { get; set; } | ||
|
|
||
| [JsonPropertyName("architectureType")] | ||
| public string? ArchitectureType { get; set; } | ||
| } | ||
|
|
||
| public sealed class TelemetryPlatformInfo | ||
| { | ||
| [JsonPropertyName("name")] | ||
| public required string Name { get; set; } | ||
|
|
||
| [JsonPropertyName("version")] | ||
| public string? Version { get; set; } | ||
|
|
||
| [JsonPropertyName("architecture")] | ||
| public string? Architecture { get; set; } | ||
| } |
15 changes: 15 additions & 0 deletions
15
src/UniGetUI.Interface.Telemetry/Events/UniGetUIActivityEvent.cs
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace UniGetUI.Interface.Telemetry; | ||
|
|
||
| public sealed class UniGetUIActivityEvent : TelemetryEventBase | ||
| { | ||
| [JsonPropertyName("enabledManagers")] | ||
| public string[] EnabledManagers { get; set; } = []; | ||
|
|
||
| [JsonPropertyName("foundManagers")] | ||
| public string[] FoundManagers { get; set; } = []; | ||
|
|
||
| [JsonPropertyName("activeSettings")] | ||
| public int ActiveSettings { get; set; } | ||
| } |
12 changes: 12 additions & 0 deletions
12
src/UniGetUI.Interface.Telemetry/Events/UniGetUIBundleEvent.cs
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace UniGetUI.Interface.Telemetry; | ||
|
|
||
| public sealed class UniGetUIBundleEvent : TelemetryEventBase | ||
| { | ||
| [JsonPropertyName("operation")] | ||
| public required string Operation { get; set; } | ||
|
|
||
| [JsonPropertyName("bundleType")] | ||
| public required string BundleType { get; set; } | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/UniGetUI.Interface.Telemetry/Events/UniGetUIPackageEvent.cs
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace UniGetUI.Interface.Telemetry; | ||
|
|
||
| public sealed class UniGetUIPackageEvent : TelemetryEventBase | ||
| { | ||
| [JsonPropertyName("operation")] | ||
| public required string Operation { get; set; } | ||
|
|
||
| [JsonPropertyName("packageId")] | ||
| public required string PackageId { get; set; } | ||
|
|
||
| [JsonPropertyName("managerName")] | ||
| public required string ManagerName { get; set; } | ||
|
|
||
| [JsonPropertyName("sourceName")] | ||
| public required string SourceName { get; set; } | ||
|
|
||
| [JsonPropertyName("operationResult")] | ||
| public string? OperationResult { get; set; } | ||
|
|
||
| [JsonPropertyName("eventSource")] | ||
| public string? EventSource { get; set; } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.