pinqloq 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package pinqloq --version 2.0.0
                    
NuGet\Install-Package pinqloq -Version 2.0.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="pinqloq" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="pinqloq" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="pinqloq" />
                    
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 pinqloq --version 2.0.0
                    
#r "nuget: pinqloq, 2.0.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 pinqloq@2.0.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=pinqloq&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=pinqloq&version=2.0.0
                    
Install as a Cake Tool

Pinqloq

Lightweight .NET SDK that buffers logs in-memory and ships them in batches to the Pinqloq ingest endpoint. No message broker, no token refresh — just an HTTPS endpoint and a secret key.

Installation

dotnet add package pinqloq

Quick Start

// Program.cs
builder.Services.AddPinqloq(options =>
{
    options.SecretKey             = "your-secret-key";
    options.ApiLogsCollectionName = "myapp_api_logs"; // optional
});

app.UsePinqloqRequestLogging(); // auto-captures every HTTP request

Manual logging

Inject IPinqloqLogger wherever you need to emit logs:

public class OrderService(IPinqloqLogger logger)
{
    public async Task CreateOrder(Order order)
    {
        // Fire-and-forget (buffered, batched -> /bulk)
        logger.Enqueue(new PinqloqLogEntry
        {
            LogLevel      = PinqloqLogLevel.Information,
            LogSourceType = PinqloqLogSourceType.Api,
            Metadata      = new() { ["orderId"] = order.Id.ToString() }
        });

        // Immediate + awaitable (-> /client-logs)
        await logger.SendAsync(new PinqloqLogEntry
        {
            LogLevel      = PinqloqLogLevel.Error,
            LogSourceType = PinqloqLogSourceType.Api,
            Metadata      = new() { ["orderId"] = order.Id.ToString(), ["stage"] = "payment" }
        });
    }
}

How it works

  • UsePinqloqRequestLogging() captures every incoming HTTP request and calls Enqueue internally.
  • A background dispatcher drains the in-memory channel every 200 logs or 2 seconds (whichever comes first) and POSTs to /api/client-logs/bulk.
  • Every request is authenticated via the X-Secret-Key header — no JWT, no token refresh.
  • On graceful shutdown, remaining buffered logs are flushed before the process exits.

Public API

Member Purpose
AddPinqloq(options => …) Registers the SDK (buffer, dispatcher, HTTP client) in DI
UsePinqloqRequestLogging() Middleware that auto-captures every HTTP request
IPinqloqLogger.Enqueue(entry) Buffered, fire-and-forget logging (batched → /bulk)
IPinqloqLogger.SendAsync(entry) Immediate, awaitable logging (→ /client-logs)

Options

Property Default Description
SecretKey (required) API secret key
ApiLogsCollectionName null Target collection for UsePinqloqRequestLogging
BatchSize 200 Max logs per HTTP request
FlushInterval 00:00:02 Max wait before flushing
QueueCapacity 10000 In-memory channel capacity
HttpTimeout 00:00:10 HTTP request timeout
AppVersionName "" App version tag on every log

License

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on pinqloq:

Package Downloads
Pinqponq.Observability

Pinqloq logging for ASP.NET Core: one structured record per request (redacted request/response bodies, route-based event names, error detail from Pinqponq.ErrorHandling), and an ILogService for application and job logs with stack trace trimming.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.3.2 403 9/14/2026
4.3.1 132 9/9/2026
4.3.0 1,838 9/8/2026
4.2.0 559 9/1/2026
4.1.0 234 8/25/2026
4.0.3 266 8/6/2026
4.0.2 352 7/22/2026
4.0.1 138 7/21/2026
4.0.0 133 7/20/2026
3.0.0 140 7/14/2026
2.0.8 168 7/14/2026
2.0.7 291 7/6/2026
2.0.6 126 7/6/2026
2.0.5 197 7/6/2026
2.0.4 138 7/6/2026
2.0.3 188 7/2/2026
2.0.2 137 7/2/2026
2.0.1 148 7/1/2026
2.0.0 222 6/23/2026
1.0.2 142 6/19/2026
Loading failed