Is there a way to create errors in GCP Error Reporting without Error Reporting associating them together? - google-cloud-platform

Often GCP Error Reporting's groupings are helpful in making the tool coherent and allowing for quick identification of issues; however, sometimes I would like to make sure that Error Reporting creates a separate group for a specific error and does not group it together, for instance the failure of a system. Is it possible, through the ErrorReporting Node.js client (we are using Node.js Cloud Functions) or otherwise to force-create an Error and ensure that it is not grouped with other, similar stack traces?

Error reporting are grouped by following these general patterns:
Exceptions are grouped together if they have the same exception type and similar stacks.
The stack trace is ignored for exceptions that are typically unrelated to the source location where they occur.
Errors without an exception stack are grouped together if they were created by the same log statement, approximated by the source location it was reported from (reportLocation).
You can also create a custom error reporting for Node.js by using the client library. Refer to this guide in setting up error reporting for Node.js

Related

AWS JS SDK Exception Information

I'm having trouble finding documentation about errors in the AWS SDK beyond a few sentences in this link. I am not able to find any docs for what properties an error may contain, what errors are likely to be thrown by specific operations like s3:GetObject, or any sample code which does good error handling. Apart from failing on purpose and seeing what errors result, are there better ways?

How to prevent errors in SAS Enterprise Guide from breaking process flow links?

I use SAS Enterprise Guide (version 5.1) for several projects. Enterprise Guide automatically creates links from programs to their input and output, which helps visualize the order of my project in an intuitive way. However, when a program errors, it breaks the link by default, and my process flow looks like a mess - which makes it much harder to debug because I cannot spot where the initial error occurs.
Is there a way to default Enterprise Guide to keep process flow links when an error happens?
Before Error
After Error
You can only do it by adding manual links. It's really annoying and tedious, but it will pay off in the long run.
SAS has gotten a lot better about adding incremental EG updates and features. Send tech support an email requesting such a thing, and they may include it in a future release.

CRM 2011 - JScript not working in one organisation but is in another

I have deployed a solution from my development area to two other separate servers/organisations. In this solution I am using some scripts on an entity form as soon as they load. In my development area and one of the others everything seems to work fine but in the other one i get an error as soon as i open the form saying "Error loading resource: syntax error". The error message relates to a function i am calling from another script from my on load script.
So i'm not sure if it is a coding error on my part as it does work in two of the CRM systems. But is there any settings or configuration that could affect it? Or an easy way to check what the issue is?
Thanks
I think i may have found an answer to this, it appears that the code is not picking up the CRM system's server and organisation name correctly for some reason on this instance. So i'm going to check through the code to see why this is

Can I alter exceptions before Elmah logs them?

I'm using Elmah in a WebForms app and would like the ability to alter an exception before Elmah logs it. In my scenario there are exceptions being thrown by some of my dependency components that have many custom InnerExceptions with details that Elmah ignores. So I'd like the opportunity to iterate the InnerExceptions and add textual details to the main exception just before Elmah logs it.
I can see how I would filter exceptions entirely, but it doesn't look like I could alter the exception and still allow it to be logged. Any ideas?
Could you handle your exceptions instead of leaving them unhandled for ELMAH to pick up automatically, and raise a custom exception with some property that ELMAH reads overridden to display what you want from your custom exception properties? e.g. Message
ErrorSignal.FromCurrentContext().Raise(...)
We addressed this by forking Elmah locally and adding code to iterate over the exceptions as per the suggestions in this Elmah issue:
http://code.google.com/p/elmah/issues/detail?id=162&can=1&q=data
Building our own version also allowed us to add a couple of other things that the current version of Elmah doesn't provide out of the box.
As an aside the next version of Elmah is in development - there seem to be substantial changes to a least some of the codebase - so I'll need to revisit this problem and our other additional logging requirements once it gets to release.

Best practices for unit testing integration with an unpredictable third party resource that you don't have control over

I've written an application that interacts with at least one third party resource (in my case it's a website and there are many websites that need to be tested against) that I do not have control over. Part of the interaction requires logging in with real user credentials and interacting with data that is transient.
As such, I have the following problems:
My test(s) must include private data (username and password) in order to log in
The data I'm looking for will no longer be valid anywhere from 24 to 48 hours after the identifier pointing at that data has been coded into the test(s) and new data matching the test scenario will need to be chosen
Which gives rise to the following questions:
How and where should I reference this data to prevent it from accidentally ending up in source control?
Is there a way to request this input as a precondition of running the relevant tests?
How should I deal with the problem that automated build scenarios will fail when the test data becomes outdated every couple of days?
What are the best practices for writing tests that deal with this sort of scenario?
I'm using Microsoft's unit testing framework with .Net 4.
I've run into this general class of problems before when writing automated tests. General they have to do with depending on an unmanaged resource. This resource can be a SOAP service, network or in your case a website.
My general approach is to have tests that can run in 2 modes.
Unmanaged Mode
I want to leverage the real resource during testing, this ensures that the code actually works with the actual resource. This is also useful when you need to extend the code for a new resource, or a change in the structure of the resource.
Managed Mode
I want to capture the transient data and use that as a fixture in the mock of the unmanaged resource. This ensures that the code still works against a particular real world example (although static), and it gives me the fine grained control that I get from using a managed (mock) resource. I can also run this test if the resource in question becomes unavailable for some time, or is simply unavailable in general (ie. being run from the build server).
It's not an exact solution for your problem, but have you considered testing against a mock website? i.e. write your own "website" that exists as part of the test framework, and behaves in a predictable and consistent manner. All it needs to do is respond to a minimal set of requests.
With this approach, you still demonstrate that your code works as expected (and doesn't regress, etc.), you can clearly identify the source of any regression as being from your code vs. the unpredictable 3rd-party stuff, and you eliminate the privacy concerns.