elmah.io changelog

December newsletter

We published a new issue of the elmah.io Newsletter: https://mailchi.mp/elmah/how-to-modify-response-headers-in-asp-net-core-middleware-and-more-elmah-io-news-15630987

Newsletter

If you want to receive an email every 2-3 months with all of the recent goodies on elmah.io, make sure to subscribe here: https://eepurl.com/dE1hCn

Blogged: Dependency Injection using keyed services is finally in ASP.NET

https://blog.elmah.io/dependency-injection-using-keyed-services-is-finally-in-asp-net/

Dependency Injection using keyed services is finally in ASP.NET

New

ChatGPT integration in elmah.io

To celebrate Sam Altman’s return to OpenAI, we are launching ChatGPT for elmah.io. Ok, the situation at OpenAI doesn’t have anything to do with launching this feature, but now is an interesting time for AI for sure.

With the new ChatGPT app for elmah.io, you can get help resolving issues directly from the elmah.io UI. Simply install the ChatGPT app and input your OpenAI API key and pick a language modal of choice (we currently support GPT-3.5-Turbo and GPT-4). A new AI tab will show up on errors valid for looking up ChatGPT help:

ChatGPT integration in elmah.io

The app is currently in beta. As always when using AI, think about what you want to share with OpenAI. When requesting help from within elmah.io we share the stack trace. In the ChatGPT app, you can enable sharing of source code and SQL for a better answer from ChatGPT.

New

Elmah.Io.JavaScript 4.1.0

We released a new version (4.1.0) of the Elmah.Io.JavaScript package. The new version includes the following changes:

New

Support for Chinese stack traces

We pushed a new version (1.2.0) of the open-source library netStack.js. The new version supports Chinese stack traces. The recent changes are available both inside of the elmah.io app as well as on the free Stack Trace Formatter tool (here’s a Chinese stack trace if you want to see how it looks).

Blogged: Validate JSON files against schema in Azure DevOps build

https://blog.elmah.io/validate-json-files-against-schema-in-azure-devops-build/

Validate JSON files against schema in Azure DevOps build

New

SQL tab on log messages involving database commands

There’s a new SQL tab available on log message details when SQL is logged as part of the message:

SQL tab on log messages involving database commands

The content is automatically pulled from log messages generated by Entity Framework and other ORMs and libraries built on top of the System.Data namespace.

For more information check out How to get the SQL tab to show up.

Blogged: Setting up better logging in Azure Functions

https://blog.elmah.io/setting-up-better-logging-in-azure-functions/

Setting up better logging in Azure Functions

New

Logging to elmah.io from SvelteKit

There’s a new install document on the documentation site for Logging to elmah.io from SvelteKit. If you are currently logging from SvelteKit we are very interested in getting your tips and tricks to make the documentation as good as possible.

New

Multiple improvements on the Inspector tab

We keep expanding the Inspector tab with useful features and additional information, making it even easier to understand an exception. With the latest release, we added the following three features:

  1. Link for known exception types to our exception landing pages available on elmah.io (like System.NullReferenceException).
  2. A new popup on HResults showing the status, facility, and error code. There’s also a link to hresult.info to dig even deeper into an HResult.
  3. The values in the Data list have been made clickable for certain types as already known from the extended log message details. Quickly look up an IP address and more.

Multiple improvements on the Inspector tab

Blogged: Conditionally add middleware in ASP.NET Core

https://blog.elmah.io/conditionally-add-middleware-in-asp-net-core/

Conditionally add middleware in ASP.NET Core

New

Nightly check of public ELMAH pages

We still see users accidentally publishing their ELMAH endpoints to the public (here’s why you don’t want that). That is the simple error browser on /elmah.axd or /elmah the open-source library ELMAH provides when logging to elmah.io from ASP.NET. To help take action if this happens we have extended uptime checks with a toggle to check this nightly. If we find a public ELMAH page we will log an error in your log.

Nightly check of public ELMAH pages

The feature is available on Enterprise plans and only makes sense to enable if you are logging from Webforms, MVC (not ASP.NET Core MVC), or Web API.

New

Serilog.Sinks.ElmahIo 5.0.38

We released a new version (5.0.38) of the Serilog.Sinks.ElmahIopackage. The new version includes the following change:

Improvement

Wrap text and copy stack trace on Inspector tab

The Wrap text and Copy buttons already known from the Detail tab have been added to the Inspector tab:

Wrap text and copy stack trace on Inspector tab

If you do not see the Inspector tab, make sure to upgrade your elmah.io client integration to version 5.

New

Improved (total rewrite) grouped search results

There’s a brand new view for showing grouped log messages. In fact, we rewrote the entire grouped search based on ideas we received from you guys and had ourselves. Grouped search results now closer correspond to what you’d expect when picking something in the group by dropdown on the log search page.

When grouping the search result you will now get a list of grouped log messages based on the grouping key. As a default, the groups will be sorted by groups with the most log messages first (minus grouping by date which will sort the groups by date). No more having to hit the Load more button multiple times to get an overview.

In addition, we introduce a new header for a group, combining the navigation between log messages in the group, with overall information for the group. This information includes a chart, some date statistics, as well as affected users and browsers by this group.

image.png

We hope that you like the changes introduced here. Since everything is a total rewrite, we probably need to tweak this moving forward. Your feedback would be very much appreciated in this process. One idea that we are already working on is to switch the i integrations/apps over to using the new grouped view. When doing so, creating an issue in your favorite issue tracker would contain a link to all instances of an error (the group) and not just the first instance.

New

Raw tab showing log message JSON on file

A new Raw tab is available on the extended log message details view. The Raw tab shows the raw JSON we have stored which is used to generate the UI. This is probably not a view you are going to launch all the time, but it can be used for various purposes like debugging why a log message is shown as it is or to get a quick overview of all of the details in one place.

Raw tab showing log message JSON on file

Blogged: How to force reload cached JSON Schemas in Visual Studio

https://blog.elmah.io/how-to-force-reload-cached-json-schemas-in-visual-studio/

How to force reload cached JSON Schemas in Visual Studio

Improvement

Improved messages search API endpoint

There’s an improved way of fetching a large set of log messages from the API. Previously (you can still do that) you’d have to use pagination to get more than 100 messages:

https://api.elmah.io/v3/messages/LOG_ID?pageSize=100&pageIndex=2

The data is stored in Elasticsearch which doesn’t allow pagination in more than 10,000 documents. With the improved API, all search requests return a new searchAfter property:

{
  "messages": [
    // ...
  ],
  "searchAfter": "1694180633270",
  "total": 42
}

In subsequent requests you can provide the API with the value of the searchAfter property to pick up where you left off:

https://api.elmah.io/v3/messages/LOG_ID?pageSize=100&searchAfter=1694180633270

The change is available on the API and in the Elmah.Io.Client 5.1 prerelease NuGet package.

Improvement

Subscribe user to multiple Daily Digests of a specific type

You can now preselect multiple Daily Digest emails of a specific type on both the profile and when editing a user on the organization settings page:

Subscribe user to multiple Daily Digests of a specific type

Blogged: How to modify response headers in ASP.NET Core middleware

https://blog.elmah.io/how-to-modify-response-headers-in-asp-net-core-middleware/

How to modify response headers in ASP.NET Core middleware