ApiGaze.AspNetCore
0.0.1-alpha2
dotnet add package ApiGaze.AspNetCore --version 0.0.1-alpha2
NuGet\Install-Package ApiGaze.AspNetCore -Version 0.0.1-alpha2
<PackageReference Include="ApiGaze.AspNetCore" Version="0.0.1-alpha2" />
<PackageVersion Include="ApiGaze.AspNetCore" Version="0.0.1-alpha2" />
<PackageReference Include="ApiGaze.AspNetCore" />
paket add ApiGaze.AspNetCore --version 0.0.1-alpha2
#r "nuget: ApiGaze.AspNetCore, 0.0.1-alpha2"
#:package ApiGaze.AspNetCore@0.0.1-alpha2
#addin nuget:?package=ApiGaze.AspNetCore&version=0.0.1-alpha2&prerelease
#tool nuget:?package=ApiGaze.AspNetCore&version=0.0.1-alpha2&prerelease
ApiGaze.AspNetCore
ApiGaze is a powerful API monitoring and telemetry middleware for ASP.NET Core applications. It helps you capture, analyze, and monitor your API traffic with ease.
Features
- 🔍 Capture HTTP request and response data
- 🔒 Built-in sensitive data redaction
- ⚡ Efficient buffering and batching
- 🛡️ Configurable path exclusions
- 📊 Rich telemetry data collection
- 🔄 Background processing
- 🎯 Flexible configuration options
Installation
dotnet add package ApiGaze.AspNetCore --version 0.1.0-beta1
Quick Start
Create an application in the ApiGaze dashboard and get your Application ID
Add ApiGaze to your application:
var builder = WebApplication.CreateBuilder(args);
builder.AddApiGaze(options =>
{
options.ApplicationId = "your-application-id";
options.Enabled = true;
});
var app = builder.Build();
app.UseApiGaze();
- Configure the middleware options:
builder.AddApiGaze(options =>
{
// Basic configuration
options.ApplicationId = "your-application-id";
options.Enabled = true;
// HTTP capture options
options.HttpCapture.CaptureRequestBody = true;
options.HttpCapture.CaptureResponseBody = true;
options.HttpCapture.CaptureQueryParameters = true;
options.HttpCapture.CaptureRequestHeaders = true;
options.HttpCapture.CaptureResponseHeaders = true;
options.HttpCapture.CaptureExceptionInfo = true;
// Exclude paths
options.ExcludedPathPatterns.Add("/health");
options.ExcludedPathPatterns.Add("/metrics");
options.ExcludedPathPatterns.Add("/swagger/*");
// Redaction rules
options.HttpCapture.RedactionRules.QueryParameterRedactionPatterns.Add("apiKey");
options.HttpCapture.RedactionRules.HeaderRedactionPatterns.Add("authorization");
options.HttpCapture.RedactionRules.BodyRedactionPatterns.Add(@"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b");
});
Beta Status
This is a beta release of ApiGaze. Some features and behaviors may change before the final release. We're particularly interested in feedback on:
- Configuration options and defaults
- Performance impact
- Memory usage
- Error handling
- Documentation clarity
Please report any issues or suggestions on our GitHub repository.
Known Limitations
- Memory usage may be high when capturing large request/response bodies
- No built-in persistence for telemetry data
- Limited error handling for external API failures
- No built-in rate limiting
Configuration Options
ApiGazeOptions
Property | Type | Default | Description |
---|---|---|---|
ApplicationId | string | - | Required. Your application identifier from the ApiGaze dashboard |
Enabled | bool | true | Whether ApiGaze is enabled |
ExcludedPathPatterns | HashSet<string> | ["/health", "/swagger/*", "/favicon.ico"] | Paths to exclude from monitoring |
HttpCaptureOptions
Property | Type | Default | Description |
---|---|---|---|
CaptureRequestBody | bool | false | Whether to capture request bodies |
CaptureResponseBody | bool | false | Whether to capture response bodies |
CaptureQueryParameters | bool | false | Whether to capture query parameters |
CaptureRequestHeaders | bool | false | Whether to capture request headers |
CaptureResponseHeaders | bool | false | Whether to capture response headers |
CaptureExceptionInfo | bool | false | Whether to capture exception information |
ExcludedPathPatterns | HashSet<string> | [] | Paths to exclude from HTTP capture |
RedactionRules | RedactionRules | new() | Rules for redacting sensitive data |
Best Practices
Security
- Always configure redaction rules for sensitive data
- Exclude health check and metrics endpoints
- Use appropriate capture settings based on your needs
Performance
- Enable only the capture options you need
- Use path exclusions for high-traffic endpoints
- Monitor memory usage with body capture enabled
Configuration
- Store sensitive configuration in secure configuration providers
- Use environment-specific settings
- Validate configuration in development
License
This project is licensed under the MIT License - see the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 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. |
-
net7.0
- Polly.Extensions.Http (>= 3.0.0)
-
net8.0
- Polly.Extensions.Http (>= 3.0.0)
-
net9.0
- Polly.Extensions.Http (>= 3.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.
Version | Downloads | Last Updated |
---|---|---|
0.0.1-alpha2 | 215 | 5/6/2025 |