SessionRecorder 0.0.2
See the version list below for details.
dotnet add package SessionRecorder --version 0.0.2
NuGet\Install-Package SessionRecorder -Version 0.0.2
<PackageReference Include="SessionRecorder" Version="0.0.2" />
<PackageVersion Include="SessionRecorder" Version="0.0.2" />
<PackageReference Include="SessionRecorder" />
paket add SessionRecorder --version 0.0.2
#r "nuget: SessionRecorder, 0.0.2"
#:package SessionRecorder@0.0.2
#addin nuget:?package=SessionRecorder&version=0.0.2
#tool nuget:?package=SessionRecorder&version=0.0.2
Multiplayer Session Recorder .NET
A .NET library for recording and managing debugging sessions with Multiplayer.
Features
- Start and stop debugging sessions
- Support for both plain and continuous sessions
- HTTP request/response capture and masking
- Custom trace ID generation
- Session attributes and resource attributes support
Installation
dotnet add package SessionRecorder
Quick Start
The SessionRecorder
is implemented as a singleton, ensuring that only one instance exists throughout your application. This makes it easy to access the session recorder from anywhere in your code.
using SessionRecorder;
using SessionRecorder.Types;
// Initialize the session recorder
var config = new SessionRecorderConfig
{
ApiKey = "your-api-key",
TraceIdGenerator = new SessionRecorderIdGenerator()
ResourceAttributes = new Dictionary<string, object>
{
{ "service.name", "my-service" },
{ "service.version", "1.0.0" }
}
};
// Initialize the session recorder
SessionRecorder.Init(config);
// Start a session
var session = new Session
{
Name = "My Debug Session",
SessionAttributes = new Dictionary<string, object>
{
{ "user.id", "12345" },
{ "environment", "production" }
},
ResourceAttributes = new Dictionary<string, object>
{
{ "host.name", "server-01" }
}
};
await SessionRecorder.Start(SessionType.PLAIN, session);
// Stop the session
var stopSession = new Session
{
SessionAttributes = new Dictionary<string, object>
{
{ "completion.status", "success" },
{ "duration.minutes", 15 }
}
};
await SessionRecorder.Stop(stopSession);
API Reference
Request Structures
Start Session Request
When starting a session, the library sends the following structure to the API:
{
"name": "string",
"tags": [
{
"key": "string",
"value": "string"
}
],
"sessionAttributes": {},
"resourceAttributes": {}
}
Stop Session Request
When stopping a session, the library sends the following structure to the API:
{
"sessionAttributes": {}
}
Session Types
SessionType.PLAIN
: Standard debugging sessionSessionType.CONTINUOUS
: Continuous debugging session with auto-save capabilities
Configuration
The SessionRecorderConfig
class supports the following options:
ApiKey
: Your Multiplayer API keyTraceIdGenerator
: Custom trace ID generatorResourceAttributes
: Global resource attributes for all sessionsGenerateSessionShortIdLocally
: Whether to generate session short IDs locally
HTTP Capture Middleware
The library includes middleware for capturing HTTP requests and responses:
app.UseMiddleware<SessionRecorderHttpCaptureMiddleware>();
License
MIT License - see LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Microsoft.Extensions.Diagnostics.Abstractions (>= 0.0.2)
- Microsoft.Extensions.Logging.Configuration (>= 0.0.2)
- OpenTelemetry (>= 1.11.1)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.11.1)
- OpenTelemetry.Extensions.Hosting (>= 1.11.1)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.11.0)
- OpenTelemetry.Instrumentation.Http (>= 1.11.0)
- System.Text.Json (>= 9.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.