Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add telemetry enrichment to StartRequest#63

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 2 commits intomainfromspike/telemetry-enrichment
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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
6 changes: 5 additions & 1 deletion.editorconfig
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -76,6 +76,10 @@ resharper_web_config_module_not_resolved_highlighting = warning
resharper_web_config_type_not_resolved_highlighting = warning
resharper_web_config_wrong_module_highlighting = warning

[{*.json,*.jsonc,*.yml,*.yaml,*.proto}]
[{*.json,*.jsonc,*.yml,*.yaml}]
indent_style = space
indent_size = 2

[{*.proto}]
indent_style = tab
indent_size = 1
34 changes: 34 additions & 0 deletionsTests.Vpn.Service/TelemetryEnricherTest.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
using Coder.Desktop.Vpn.Proto;
using Coder.Desktop.Vpn.Service;

namespace Coder.Desktop.Tests.Vpn.Service;

[TestFixture]
public class TelemetryEnricherTest
{
[Test]
public void EnrichStartRequest()
{
var req = new StartRequest
{
CoderUrl = "https://coder.example.com",
};
var enricher = new TelemetryEnricher();
req = enricher.EnrichStartRequest(req);

// quick sanity check that non-telemetry fields aren't lost or overwritten
Assert.That(req.CoderUrl, Is.EqualTo("https://coder.example.com"));

Assert.That(req.DeviceOs, Is.EqualTo("Windows"));
// seems that test assemblies always set 1.0.0.0
Assert.That(req.CoderDesktopVersion, Is.EqualTo("1.0.0.0"));
Assert.That(req.DeviceId, Is.Not.Empty);
var deviceId = req.DeviceId;

// deviceId is different on different machines, but we can test that
// each instance of the TelemetryEnricher produces the same value.
enricher = new TelemetryEnricher();
req = enricher.EnrichStartRequest(new StartRequest());
Assert.That(req.DeviceId, Is.EqualTo(deviceId));
}
}
2 changes: 1 addition & 1 deletionVpn.Proto/RpcVersion.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ namespace Coder.Desktop.Vpn.Proto;
/// </summary>
public class RpcVersion
{
public static readonly RpcVersion Current = new(1,0);
public static readonly RpcVersion Current = new(1,1);

public ulong Major { get; }
public ulong Minor { get; }
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp