WatchDog.SDK 0.1.0-alpha

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This is a prerelease version of WatchDog.SDK.
dotnet add package WatchDog.SDK --version 0.1.0-alpha
NuGet\Install-Package WatchDog.SDK -Version 0.1.0-alpha
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="WatchDog.SDK" Version="0.1.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WatchDog.SDK --version 0.1.0-alpha
#r "nuget: WatchDog.SDK, 0.1.0-alpha"
#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.
// Install WatchDog.SDK as a Cake Addin
#addin nuget:?package=WatchDog.SDK&version=0.1.0-alpha&prerelease

// Install WatchDog.SDK as a Cake Tool
#tool nuget:?package=WatchDog.SDK&version=0.1.0-alpha&prerelease

WatchDog

Version Downloads

Introduction

WatchDog is a real-time cloud-based monitoring, logging, security and alert solutions for software applications.

Support

  • .NET Core 3.1 and newer

Installation

Install via .NET CLI

dotnet add package WatchDog.SDK --version 1.0.0

Install via Package Manager

Install-Package WatchDog.SDK --version 1.0.0

Usage

Use the WatchDog middleware as shown below:

Add WatchDog Namespace in Startup.cs for .NET 3.1 and below and in Program.cs for .NET 5 and above

using WatchDog;
For .NET 3.1 and below, register WatchDog in Startup.cs under ConfigureService()
services.AddWatchDog(config =>
{
    config.AppID = "YOUR-APP-ID";
    config.AppKey = "YOUR-APP-KEY";
    config.Blacklist = "password, token, clientSecret";
});
For .NET 5 and above, in Program.cs
builder.Services.AddWatchDog(config =>
{
    config.AppID = "YOUR-APP-ID";
    config.AppKey = "YOUR-APP-KEY";
    config.Blacklist = "password, token, clientSecret";
});

Add WatchDog middleware to the HTTP request pipeline

For .NET 3.1 and below Startup.cs under Configure() For .NET 5 and above Program.cs

app.UseWatchDog();

Logging

_logger.LogEvent("Testing Event Logging", true, "xTCZ", data: JsonSerializer.Serialize(Summaries), metadata: "Metadata Stuff");
_logger.LogIncident("Severe Incident", IncidentSeverity.Critical);
_logger.LogException(ex);

_logger.LogInformation($"Response: {JsonSerializer.Serialize(result)}");
_logger.LogDebug("..DEBUG..");
_logger.LogTrace("..TRACE..");
_logger.LogError("..ERROR..");
_logger.LogCritical("..CRITICAL..");
_logger.LogWarning("..WARNING..");
Sink Logs from ILogger

You can also sink logs from the .NET ILogger into WatchDog

For .NET 5 and above

builder.Logging.AddWatchDogLogger();

For .NET Core 3.1 and below, configure logging and add .AddWatchDogLogger() to the builder creation method of the Program.cs class

Host.CreateDefaultBuilder(args)
 .ConfigureLogging( logging =>
 {
     logging.AddWatchDogLogger();
 })
 .ConfigureWebHostDefaults(webBuilder =>
 {
     webBuilder.UseStartup<Startup>();
 });

Enjoy!

Copyright (c) 2024 WatchDogHQ https://www.watchdoghq.co

Documentation

https://www.docs.watchdoghq.co

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
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
0.1.0-alpha 58 1/29/2024