SessionRecorder 1.0.1

dotnet add package SessionRecorder --version 1.0.1
                    
NuGet\Install-Package SessionRecorder -Version 1.0.1
                    
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="SessionRecorder" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SessionRecorder" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="SessionRecorder" />
                    
Project file
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 SessionRecorder --version 1.0.1
                    
#r "nuget: SessionRecorder, 1.0.1"
                    
#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 SessionRecorder@1.0.1
                    
#: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=SessionRecorder&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=SessionRecorder&version=1.0.1
                    
Install as a Cake Tool

Description

<div align="center"> <a href="https://github.com/multiplayer-app/multiplayer-session-recorder-dotnet"> <img src="https://img.shields.io/github/stars/multiplayer-app/multiplayer-session-recorder-dotnet.svg?style=social&label=Star&maxAge=2592000" alt="GitHub stars"> </a> <a href="https://github.com/multiplayer-app/multiplayer-session-recorder-dotnet/blob/main/LICENSE"> <img src="https://img.shields.io/github/license/multiplayer-app/multiplayer-session-recorder-dotnet" alt="License"> </a> <a href="https://multiplayer.app"> <img src="https://img.shields.io/badge/Visit-multiplayer.app-blue" alt="Visit Multiplayer"> </a>

</div> <div> <p align="center"> <a href="https://x.com/trymultiplayer"> <img src="https://img.shields.io/badge/Follow%20on%20X-000000?style=for-the-badge&logo=x&logoColor=white" alt="Follow on X" /> </a> <a href="https://www.linkedin.com/company/multiplayer-app/"> <img src="https://img.shields.io/badge/Follow%20on%20LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" alt="Follow on LinkedIn" /> </a> <a href="https://discord.com/invite/q9K3mDzfrx"> <img src="https://img.shields.io/badge/Join%20our%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord" /> </a> </p> </div>

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 session
  • SessionType.CONTINUOUS: Continuous debugging session with auto-save capabilities

Configuration

The SessionRecorderConfig class supports the following options:

  • ApiKey: Your Multiplayer API key
  • TraceIdGenerator: Custom trace ID generator
  • ResourceAttributes: Global resource attributes for all sessions
  • GenerateSessionShortIdLocally: 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 180 8/25/2025
1.0.0 263 8/25/2025
0.0.7 259 8/25/2025
0.0.6 268 8/25/2025
0.0.5 263 8/25/2025
0.0.4 98 8/15/2025
0.0.3 99 8/15/2025
0.0.2 131 8/14/2025