Docs · .NET

.NET logging and alerts, in 5 minutes

Your C# app's errors with their stack trace, each request's thread across your services and a phone alert when an order never finishes. One file, no NuGet packages.

  1. 1

    Install

    // copy Estiaje.cs into your project (.NET 6+)

    It's a file with no dependencies: copy it from here. Change "mi-api" to your service's name.

  2. 2

    Your key

    Create your account and put the key in ESTIAJE_TOKEN. Or ask your AI “connect this repo to Estiaje” (the connector). Without the key nothing leaves over the network: you can instrument today.

  3. 3

    Your errors and each request's thread

    ● Tested in CI
    // Program.cs
    Estiaje.CapturarErrores();   // uncaught errors
    
    var builder = WebApplication.CreateBuilder(args);
    builder.Services.AddTransient<EstiajeSaliente>();
    builder.Services.AddHttpClient("inventario").AddHttpMessageHandler<EstiajeSaliente>();   // passes the thread on
    var app = builder.Build();
    
    app.Use(async (ctx, next) =>
    {
        Estiaje.EmpezarHilo(ctx.Request.Headers["traceparent"]);   // each request's thread
        await next();
    });
    // a console app or a worker that exits right away
    Estiaje.CapturarErrores();   // uncaught errors
    Estiaje.EmpezarHilo(null);   // a new thread for this job
    Procesar();
    await Estiaje.Evento("corte.terminado");   // here, do await it before exiting
  4. 4

    The process that must finish

    Estiaje.Evento("order.paid", new { order_id = order.Id, amount = order.Total });   // no await needed
    // … when it ships …
    Estiaje.Evento("order.shipped", new { order_id = order.Id });
  5. 5

    The alert

    In the dashboard, under Processes: “every order.paid expects its order.shipped, by order_id, within 30 minutes”. If it never comes, you get a phone, email or Slack alert, with the money at risk.

And if you want more
  • Errors you catch: Estiaje.Error(e, new { order_id = order.Id }), with their stack.
  • Your other services get the thread on their own with EstiajeSaliente on your HttpClient.
  • .NET 6+; it uses .NET's own HttpClient, nothing else.

Everything else is in the full docs.

Create account, 14 days of Pro No card required.