GithubHelp home page GithubHelp logo

toolhouse / monitoring-dotnet Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 97 KB

Monitoring library for ASP.NET websites.

License: Apache License 2.0

C# 98.48% Batchfile 1.52%
dotnet prometheus monitoring asp-net

monitoring-dotnet's Introduction

Toolhouse Monitoring

Travis NuGet

This library adds logging and monitoring capabilities to ASP.net websites. It provides:

Getting Started

First, add this library to your project:

> Install-Package Toolhouse.Monitoring

From there you'll need to configure each endpoint you'd like to add:

Securing Endpoints

Metrics and readiness endpoints can optionally be secured via HTTP Basic Authentication. You can use the built-in <basicAuthentication> and related elements in your Web.config or add the following to your Web.config:

<appSettings>
    <add key="Toolhouse.Monitoring.Username" value="" />
    <add key="Toolhouse.Monitoring.PasswordSha256" value="86a9836cfd1599012ef0e164da78f0676a227c453dd5ef76abd070e0d30e289d" />
</appSettings>
Setting Description
Toolhouse.Monitoring.Username Basic auth username.
Toolhouse.Monitoring.Password SHA-256 hash of basic auth password. Should be a 64-character hex string.

Integrating with ASP.NET MVC

In ASP.NET MVC applications, it may be necessary to explicitly ignore routes that are to be handled via the IHttpHandlers provided by this library:

// In Global.asax.cs
// Ignore routes used for metrics + monitoring
RouteTable.Routes.Ignore("health");
RouteTable.Routes.IgnoreRoute("metrics");
RouteTable.Routes.IgnoreRoute("readiness");

Packaging

To push a new version to Nuget:

  1. Update the AssemblyInformationalVersion attribute in AssemblyInfo.cs.
  2. Commit your changes.
  3. Tag your version: git tag vX.X.X and push your tags.
  4. Run package.cmd to build a new package in Dist/.
  5. Push your package via nuget push (see package.cmd output for instructions).

Contributing

To request a new feature or report a bug open an issue in Github for discussion prior to submitting a pull request. If you're willing to contribute changes/fixes mention that in the issue report or discussion. If you're reporting a bug be as specific as possible about the conditions causing the bug. If possible, attach a small sample project illustrating the issue.

One of the primary objectives of this project is to keep the library as simple and small as possible. If a proposed change is not a common use case or introduces undue complexity it may not be accepted.

License

Copyright 2017 Toolhouse, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

monitoring-dotnet's People

Contributors

matthinz avatar bgradin avatar tantalic avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.