Prior to version 3.1, we used an early version of the Foundatio Jobs system to run our out-of-process jobs via Azure WebJobs. We found it to be quite a pain to figure out which jobs were running or eating up system resources because every job was titled Job.exe (just like figuring out the w3wp IIS process is running). Also, just to run an out-of-process job, one would have to compile the source, copy dependencies to a common bin folder, and then run an executable (Job.exe) with parameters that specify the job type.
These tedious and error-prone tasks that had to be completed just to get a job to run are a thing of the past.
Now, with Foundatio, our open source app building block solution used in Exceptionless, you just define a new Job that runs (via the run method) and you can use the Foundatio Jobs API to run the job in process, out of process, continuous, or one time without changing the implementation.
This new approach also gave us a great deployment strategy, for free. Simply copy the job executable and bin folders and run it anywhere!
Jobs (processes) running in Azure as an Azure web job #
Foundatio Jobs allows you to run a long running process (in process or out of process) with out worrying about it being terminated prematurely. By using Foundatio Jobs you gain all of the following features without changing your job implementation:
Run job in process
Run job out of process
Run job with a start up delay
Run job in an continuous loop with an optional interval delay.
In this sample we'll just define a new class called HelloWorldJob that will hold our job that increments a counter and derives from JobBase. Please note that there are a few different base classes you can derive from based on your use case.
But our goal is to run this out of process in an Azure WebJob (this also works if you want to run this as a service or from the desktop).
The first step is to create a new console application and reference the Foundatio NuGet Package and the project that contains our HelloWorldJob. We are going to call our console application HelloWorldJob. Inside of the Program class, we'll update the main method to run our job.
namespaceHelloWorldJob{ publicclassProgram{ publicstaticintMain(string[] args){ // NOTE: This should be the path to your App_Data folder of your website. var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,@"..\..\..\Api\App_Data"); if(Directory.Exists(path)) AppDomain.CurrentDomain.SetData("DataDirectory", path);
// Get a service provider so we can create an instance of our job. var serviceProvider = ServiceProvider.GetServiceProvider("JobSample.JobBootstrappedServiceProvider,JobSample");
var job = serviceProvider.GetService<JobSample.HelloWorldJob>(); returnnewJobRunner(job,initialDelay: TimeSpan.FromSeconds(2),interval: TimeSpan.Zero).RunInConsole(); } } }
The last steps are to simply compile the project and deploy it to your Azure website!
Errors
@frankebersoll added support for deduplicating JavaScript erros. Thanks!
**Data Collection
** Frank's back at it, adding support for collecting extra exception data that was already in the .NET client like module info, custom exception properties, and everything else that was already displayed in the UI when using the .NET client.
Node **Info
** Support for collecting Node module info has also been added (thanks again, @frankebersoll).
Bug Fix - Invalid States
An issue where Data Exclusions could cause events to be submitted in an invalid state has been fixed.
As always, let us know if you have any questions or feedback! #
Read Configuration
We added support for reading configuration from environmental variables and app settings
**Closing Applications
** Closing applications after submission is now easier due to the new SubmittedEvent event handler.
**Custom Persistence Settings
** The new QueueMaxAttempts and QueueMaxAge configuration settings allow custom persistence settings and are intended to improve offline support. Thanks @airwareic!
Data Exclusions Improvements
We've made huge improvements to Data Exclusions, which now check default data and extra exception properties.
**New Overloads
** Thanks @xbelt for creating overloads for CreateLog and SubmitLog to accept the LogLevel enum!
Custom Themes
@mgnslndh updated the styling of the CrashReportDialog to play nice with custom themes. Thanks!
**Dependencies
** All dependencies (Nancy, NLog, etc) have been updated.
**Deprecated!
** The EnableSSL property has been marked Obsolete because it is no longer used. ServerURL is now being looked at for this.
If you thought Exceptionless was fast before, prepare to have your mind blown by what we've been able to do in version 3.1, which released today.
In short, we've reduced cpu and memory usage, increase caching efficiency, and sped up searching, all quite significantly as you'll see below.
Along with these speed boosts, we've also made Job improvements (look for a blog post on this soon) and upgraded to .NET 4.6 (self-hosters, please install .NET 4.6 on your servers before upgrading).
Details on the release changes can be found below.
We reduced the CPU and Memory load across the entire app. This allows the application to use fewer resources, meaning it has more time to process additional events, making everything faster. Between making Exceptionless and Foundatio 100% Async and these improvements, we've drastically increased the efficiency of the entire platform.
Below, we see the increase in performance from two examples. On the left, we see a reduction in CPU and Memory usage for a deployed web app instance. On the right is a visible reduction in CPU usage for an Elasticsearch node.
By profiling the Elasticsearch queries for efficiency and usage, we've been able to reduce the overall number we were running and improve the efficiency on the ones that still are.
Caching efficiency has been improved by removing redundant components that were utilizing valuable resources. For example, we removed the SignalR Redis Backplane, which drastically decreased the number of calls to Redis. Overall, we've made the app smarter throughout regarding how we cache and retrieve data.
We've offloaded long-running API tasks to background jobs, freeing up a lot of resources in the app and allowing us to scale work items independently. For example, marking a stack as fixed or removing a project may take a few moments to be updated now, but the trade-off is worth it. We're working on updating the UI experience to prompt users that the task is running in the background.
Exceptionless is now running on .NET 4.6, which has improved startup time due to various improvements with the new version. Self-hosting users should be sure to upgrade to .NET 4.6 on their servers before updating Exceptionless.
We're always striving to improve the efficiency of Exceptionless and all of our projects. If you see any room for improvement or have any comments when using anything from us, please send us an in-app message, submit a GitHub issue or contact us on the website.
We've been hard at work on several things here at Exceptionless, including a minor version release of our JavaScript Client!
Please see the details of this release below.
Also, we would like to give a shout out to @frankerbersoll, @srijken and the entire community for help squashing bugs, reporting issues, and providing general feedback. You guys rock.
Foundatio is a pluggable, scalable, painless, open source solution for caching, queues, locks, messaging, jobs, file storage, and metrics in your app.
In Version 3.0, we've made several improvements, including, as promised in our initial Foundatio blog post, going full async.
Take a closer look at the new enhancements, below, and head over to the GitHub repo to try Foundatio today. We think you'll find it very handy.
For all our current users, you'll need to upgrade your Foundatio NuGet package and existing Foundatio code to use the async implementations/conventions. The update should be fairly straightforward - we haven't had or heard of any issues so far, including when upgrading Exceptionless.
We've gone 100% async, which means no more blocking synchronous code, allowing your apps to be even more responsive. For more on async and its benefits, take a look at this Microsoft article.
Along with going completely async, we've removed non async methods from the API and simplified the API overall. We wanted to make it easy for developers to roll out new implementations and use the existing API.
New methods
We also added new, useful methods across all the APIs to make it easier to perform common tasks. One example includes adding CalculateProgress() to WorkItemHandlerJobs. We hope these helpers allow you to be more productive.
Because we always want more speed out of our apps (and we know you do, too), we used Red Gate's ANTS Performance Profiler to profile various apps, such as Exceptionless, and track down "hot" sections of code. By hot, we mean those pieces of code devoured more resources and took longer to run than all other application code. By doing so, we were able to pinpoint core pieces of Foundatio that were performing poorly compared to what they could be doing. Then we fixed them.
A few optimization examples
Maintenance code in various locations like queues, caches, etc, could and would run in a tight loop, sometimes pegging the CPU to 100% depending on the configuration. By running through and removing that maintenance code, or changing the way it was implemented to be triggered only when needed, rather than running in a constant worker loop, we drastically reduced CPU load and increased efficiency.
We also made massive improvements to queues and locks, on top of the maintenance code changes. Our Dequeue and AcquireLock methods would constantly pull for new items in a loop with a small timeout, which is obviously inefficient. Now we are using async monitors and pulse when a message is received over the message bus. This allows for huge improvements as the code will wait/sleep for a single monitor (of multiple monitors that could be waiting) to get triggered. This means your app isn’t wasting CPU cycles waiting, or external network calls looking for locks or new queue items. Instead, it’s running your app code and getting immediately notified when the lock is available or a new queue item is enqueued. Pretty slick!
Caching got a huge performance boost, too. For InMemoryCache clients, we moved from reflection-based object copying to using Expression Trees. This reduced the time required to get items from cache by a large percentage. Read more about implementing Expression Trees and see the difference it makes here.
We made many other improvements to ensure your apps run fast when using Foundatio, too many to be listed here. If you're already using it, just update your NuGet package to the latest version to take advantage of these improvements. If you're not using it yet, try it out. It's worth a shot, we promise!
If you missed our JavaScript Client announcement, this is a great chance to see just how quick and easy the client is to install and use! You can be finding those hard to track down bugs, errors, and exceptions, as well as tracking other events and log messages, in literally minutes.
We've made it super easy to get up and running, as you'll see below. Take a look and let us know what you think!
Log in to your Exceptionless Dashboard and get your project's API key (Admin > Projects > Select Project > API Keys)
* If you don't have a project, you'll need to create one by going to Admin > Projects > Add New Project
Open the extracted folder on your local machine and go to the "example" folder, then edit index.html.
Replace the API key in the exceptionless.js script tag with your own, and comment out the line with serverURL in it (not needed for demo).
Open index.html in your browser and open your browser's developer tools console so we can see the events fire.
* We've added quick-fire buttons to this page that automatically generate events for you to play around with for the purpose of this demo.
Click on one, generate 100 random events for instance, and you'll see the events queue up in the console. After a few seconds, you should see a queue processing notification telling you it's done processing.
Go back to your Exceptionless project dashboard, and you will see the events hit the system in real time.
* Make sure you are viewing the appropriate project and time period in your dashboard, otherwise you might not see the new events come in.
**Stop** beating your head against the keyboard tracking down those hard-to-find bugs and cut down your development time in general by using Exceptionless to **report and log errors, feature usages, and any other event** within your project.
We're not just for .NET developers anymore. Our JavaScript client allows you to use Exceptionless in almost **any development environment**, and you can get it up and running in minutes!
Learn more below, including how to get started in **just about a minute and a half**!
Now Serving... **5,000,000+ Events Per Month 2000+ Active Projects**
"Exceptionless is awesome. I've STOPPED worrying about whether I'm losing customers to bugs I don't know about." - Eric B.
This 1:37 video demonstrates how quick and easy it is to get the Exceptionless JavaScript client up and running. Take a few minutes to integrate it with your project and gain visibility you've never had before on bugs, feature usages, and more!
This month (Aug, '15) we will surpass 5 MILLION EVENTS PER MONTH!
That's pretty huge, so we thought we would celebrate by highlighting a few of the awesome companies that use Exceptionless and throw out a some pretty cool statistics we dug up from the database.
If your company isn't on this list, don't worry - it's not because we don't love you! If you would like your company highlighted on the website, simply send us an in-app message explaining how Exceptionless has helped you squash bugs and improve your development.
User Report is an online survey and feedback tool used to collect information about and from website visitors. The data User Report's tools identifies is useful in usability studies, helps websites better identify their demographics, gives users an easy way to provide feedback, and more. The company's solutions are used by ebay, Toyota, National Geographic, and other large national and international brands.
Used by Facebook, MasterCard, and other large worldwide brands, eMarketer provides insights into the digital marketing world by providing customers with the information they need to run their business effectively and efficiently online. This information includes industry-specific research, insights, and benchmarks.
"Exceptionless allows us to prioritize fixes smarter by showing frequently occurring errors. In real time!" - Ryan Hoffman, eMarketer
Actipro Software provides industry-leading .NET user interface controls for a variety of frameworks, including WPF, WinRT, Silverlight, and WinForms. They are known for their syntax-highlighting code editor control, SyntaxEditor, among other things.
Beth Israel Deaconess Medical Center - Harvard Medical School Teaching Hospital #
BIDMC is one of the nation's preeminent academic medical centers focusing on excellence in clinical care, research, and education.
"The primary reasons that we switched to Exceptionless from our own code is that Exceptionless captures additional detail (including code line numbers), Exceptionless has a better interface and design for reviewing and managing errors and bugs (including summary views that we didn’t previously have), and we no longer need to maintain our own error-logging code." - Philip Dickerson, BIDMC
LegalDesk is software designed for managing law firms or independent legal practices and includes everything from document organization and sharing to timesheets and finances/billing.
CodeSmith Tools is a Dallas-based software development company focused on creating software tools that increase developer productivity. Their flagship product, CodeSmith Generator, has seen huge success over the years as a template driven source code generator that automates common application source code creation for text-based languages. They also provide a variety of frameworks for generating proven architectures.
IKA is a laboratory equipment maker in the research and development field that builds innovative magnetic stirrers, mixers, overhead stirrers, shakers, homogenizers, mills, rotary evaporators, calorimeters, laboratory reactors and the specially developed software for analysis applications.
"I’m using Exceptionless to report bugs /crashes which I encounter routinely while testing the UI. It helps me zero in on what could be the issue, AND have a documented track of what all errors I’ve seen... I’d say that Exceptionless helps me find all the bugs which I’d have to spend more time on zeroing in on, faster." - Bharat Mallapur, IKA
Teamaton is a small software development company focused on creating user-friendly and profitable web applications for its clients using .NET technologies.
Right now, Teamaton is working on an intuitive time tracking tool where they have implemented Exceptionless to monitor errors during development.
The Agileist is a development company based in Kansas City that specializes in Azure web development, systems development, and systems integration in an agile environment.
Once again, we'd like to extend our thanks to all the awesome users we have that make Exceptionless such a great project to work on and use. Everyone has provided excellent feedback, allowing us to continue pushing towards a faster, more efficient, more effective solution for all your error and event reporting needs.
Self hosting allows you to run your own instance of Exceptionless, our real-time error, feature, and log reporting tool, on your own systems - FOR FREE!
When developing Exceptionless 3.0, we put extensive focus on making self hosting much easier, and therefore more viable, for our users.
It is now possible to get a test environment up and running on your local machine in only a few minutes, and production environments can be set up very quickly as well.
Getting your self hosted instance of Exceptionless up and running is super easy. In the video below, Blake does the entire install on his local machine and is sending events to Exceptionless in less than 2 minutes!
Please note that you should review the requirements on the Self Hosting Documentation page before installing your own instance.
Exceptionless has come a long way, and it's only going to get easier, faster, and more robust moving forward. Our users are a huge part of that, so please submit an issue on GitHub or send us an in-app message if you have any feedbacks, bugs, installation questions, etc. Thanks!