Telemetria 1.2.0
dotnet add package Telemetria --version 1.2.0
NuGet\Install-Package Telemetria -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Telemetria" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Telemetria" Version="1.2.0" />
<PackageReference Include="Telemetria" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Telemetria --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Telemetria, 1.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Telemetria@1.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Telemetria&version=1.2.0
#tool nuget:?package=Telemetria&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Telemetria
疎結合で汎用的なテレメトリ収集・診断ライブラリです。利用状況の集積、例外の自動解析、ハイブリッド暗号化とワンタイムパスワードによる匿名送信、サーバー非依存のローカルフォールバックを提供します。プラグインなどに組み込み、発生した問題を自動で送信する用途を想定しています。
特長
- 疎結合 / SOLID: すべての主要機能はインターフェースで抽象化され、差し替え可能です。
- 高度な暗号化: 一時鍵による楕円曲線ディフィー・ヘルマン (P-256) と HKDF、AES-256-GCM を組み合わせたハイブリッド暗号化を採用しています。
- 匿名通信: 個人を特定しない匿名識別子と、RFC 6238 (TOTP / Google Authenticator 互換) のワンタイムパスワードで送信します。
- サーバー不要でも動作: ローカルファイルへの書き出し、送信失敗時のローカル退避と自動再送に対応します。
- 拡張可能なパイプライン: 重大度フィルタ、サンプリング、文脈付与、匿名化、任意の追加処理を順に適用します。
利用例
services.AddTelemetria(builder =>
{
builder.ConfigureCore(o =>
{
o.Mode = TelemetriaMode.Both;
o.ApplicationName = "MyPlugin";
o.ApplicationVersion = "1.2.3";
});
builder.UseRemote(
transport => transport.Endpoint = new Uri("https://example.invalid/ingest"),
encryption =>
{
encryption.KeyId = "2026-server";
encryption.ServerPublicKeyBase64 = serverPublicKeyBase64;
},
otp => otp.SecretBase32 = sharedSecretBase32);
builder.UseLocalFile(file => file.Directory = "telemetry-local");
});
public sealed class Worker(ITelemetryClient telemetry)
{
public void DoWork()
{
telemetry.TrackUsage("worker.start");
try
{
Execute();
}
catch (Exception ex)
{
telemetry.TrackException(ex);
}
}
}
サーバー側の鍵生成
var keyPair = HybridKeyPair.Generate();
var serverPublicKeyBase64 = Convert.ToBase64String(keyPair.PublicKey);
受信側では HybridPayloadOpener でペイロードを復号し、IOneTimePasswordProvider.Validate でワンタイムパスワードを検証できます。
ライセンス
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.