pinqloq 3.0.0

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

Pinqloq

NuGet Downloads License: MIT

Pinqloq is an ASP.NET Core structured logging and log shipping SDK for centralized application logs. It captures HTTP request/response logs through middleware and sends manual application events to the Pinqloq log management platform using in-memory buffering, batching, and HTTPS delivery.

Features

  • Automatic ASP.NET Core request logging
  • Manual structured application events
  • Buffered and batched HTTPS delivery
  • No customer-managed message broker or token refresh flow
  • Graceful shutdown flush

Requirements

  • .NET 9.0 or later
  • A Pinqloq project and secret key

Installation

dotnet add package pinqloq

Quick Start

Store your secret key in configuration, an environment variable, or a secret manager. Do not hardcode production credentials.

{
  "Pinqloq": {
    "SecretKey": "your-secret-key",
    "ApiLogsCollectionName": "myapp_api_logs"
  }
}

Register Pinqloq and enable automatic request logging:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddPinqloq(options =>
{
    options.SecretKey =
        builder.Configuration["Pinqloq:SecretKey"]
        ?? throw new InvalidOperationException("Pinqloq secret key is missing.");

    options.ApiLogsCollectionName =
        builder.Configuration["Pinqloq:ApiLogsCollectionName"];
});

var app = builder.Build();

app.UsePinqloqRequestLogging(options =>
{
    options.ExcludePaths("/health", "/swagger");
});

app.MapControllers();
app.Run();

The middleware captures the HTTP method, path, status code, request body, and response body. Bodies are truncated at 32 KB.

Manual Logging

Inject IPinqloqLogger to send structured application events:

public class OrderService(IPinqloqLogger logger)
{
    public void CreateOrder(Order order)
    {
        logger.Enqueue(new PinqloqLogEntry
        {
            Event = "order.created",
            LogLevel = PinqloqLogLevel.Information,
            LogSourceType = PinqloqLogSourceType.Backend,
            Metadata = new()
            {
                ["orderId"] = order.Id.ToString()
            }
        });
    }
}

Event is required for manually created entries and is used as the log title. Request-logging middleware creates it automatically.

Add Request Metadata

To attach searchable request metadata, replace the middleware call from Quick Start with the following configuration. Use AddMetadata for searchable values such as user, tenant, and correlation IDs. Use AddDetail for additional drill-down information. The event key (the panel title) defaults to "{method} {path}" and can be overridden with AddMetadata("event", …).

app.UsePinqloqRequestLogging(options =>
{
    options.ExcludePaths("/health", "/swagger");

    options.AddMetadata("userId", context =>
        context.User.FindFirst("sub")?.Value);

    options.AddMetadata("correlationId", context =>
        context.TraceIdentifier);
});

Security and Reliability

Request and response bodies may contain credentials, tokens, personal information, or other sensitive data. Exclude sensitive endpoints before enabling body logging in production.

Logs are buffered in memory and sent in batches. Buffered logs may be lost if the process is terminated without a graceful shutdown.

Delivery failures are reported through onFailed callbacks and, even without callbacks, as throttled entries in your application log — never silently discarded, but also never blocking. If your secret key is authorized for more than one collection, set ApiLogsCollectionName (or a per-entry CollectionName); otherwise the batch is rejected.

Documentation

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 406 9/14/2026
4.3.1 133 9/9/2026
4.3.0 1,870 9/8/2026
4.2.0 567 9/1/2026
4.1.0 235 8/25/2026
4.0.3 267 8/6/2026
4.0.2 353 7/22/2026
4.0.1 139 7/21/2026
4.0.0 134 7/20/2026
3.0.0 140 7/14/2026
2.0.8 170 7/14/2026
2.0.7 292 7/6/2026
2.0.6 127 7/6/2026
2.0.5 199 7/6/2026
2.0.4 139 7/6/2026
2.0.3 189 7/2/2026
2.0.2 138 7/2/2026
2.0.1 151 7/1/2026
2.0.0 224 6/23/2026
1.0.2 142 6/19/2026
Loading failed

BREAKING: removed SendAsync, PinqloqSendResult, and the SinglePath option. All logs are now delivered through the buffered and batched Enqueue pipeline. Use onSent and onFailed callbacks to observe delivery outcomes. Rejected batches are reported to the application log with throttling and the server response body. This release also includes the revised README and documentation links.