Handling query failures in react-router-relay - relayjs

I am new to Relay and am working on a small project using react-relay/classic with react-router-relay. I am trying to decide the best way to implement simple error handling for the case where a query fails.
I am just looking for a "catch all" system which will allow me to tell the user that it looks like they're not online. Nothing more complex is required.
From the Relay documentation, it looks like the regular relay way to do this would be with the renderFailure prop on Relay.RootContainer. However, as I am using react-router-relay I never create a Relay.RootContainer directly - it looks like these are created under-the-hood by react-router-relay.
I haven't been able to find anything in react-router-relay documentation about how to access the underlying Relay.RootContainer props, or on error handling. I have also had a quick look at the source code and nothing obvious jumps out.
So my question is: is there any way I catch query failures when using react-router-relay?

Related

Revulytics data not showing in Dashboard

I am using Revulytics SDK to track feature usage and came across the below problem.
I am sending feature usage after properly setting up the SDK configuration etc, using the EventTrack() method like this:
GenericReturn grTest = telemetryObj.EventTrack("FeatureUsage", textBoxName.Text.ToString(), null, false);
This returns OK and usually, I can see the usage data in the dashboard. However, after multiple tests, the data I am sending does not show up on the dashboard.
Can anyone hint me how to debug this? Thanks for any help!
I hit a similar issue when first working with this SDK.
I was able to address this as soon as I understood the following:
There are event quotas for the incoming events;
Event names are used for making the distinction.
So when I was sending dummy test data, it made it there, but when I sent some demo data for stakeholders, it was not showing up.
I think the same happens here. You're getting the event name form textbox.text... Pretty sure that varies every time you run the code.
Here are the things to keep in mind when testing your code:
the server has a mechanism to discard / consider events;
implicitly, it allows first xx events depending on the quota;
if you are sending more than xx events, they will not show up in reports.
So, you must control which events to discard and which to consider (there are a couple of levels you can configure, and based of them you can get the events in various types of reports).
Find the "Tracked Events Whitelist Management". You will be able to control these things form there.
This blog helped me (it is not SDK documentation): https://www.revulytics.com/blog/getting-started-with-usage-intelligence-part2-event-tracking
Good luck!

create relationship in parse dashboard

does anyone know if it is possible to create relationships in the dashboard of parse?
I'm running the bitnami parse api 1.0.18 through aws ec2 and can't see anyway of doing it and the documentations only says you can do it through code. i want to have these set up in the background as the user won't write to them, probably just download some data and images.
i could just go and create a whole heap of tables with unique identifiers but this seems a bit of a dumb work around.
I strongly suggest you look into Cloud code. This is one of the reason why cloud code works so well! Simple to setup and little bit of javascript you'll be on your way.
http://parseplatform.github.io/docs/cloudcode/guide/
If its something that needs to happen before the insert, look at the beforeSave method.

Write in the Database from within the database

Hopefully the title is clear, I couldn't find a better name but if someone can improve it please update it, thanks.
I would like the Firebase database to write on a node if a certain condition is met. For example, if one node receives an input from a client (say an angular app) then another node in the database should write certain data, something like a callback that is fired when a node receives some data.
I know there are 4 rule types (.read .write .validate .indexOn), what I am thinking of is some kind of .callback rule that is fired and writes on a node after some other node has received an input.
Obviously this can be achieved via a server side script but Firebase is about a server-less approach so I am trying to understand what are its current limits and what I can do with it.
Thanks for your responses
firebaser here
Running the multi-location update client-side or on a server-side process that you control are currently the only ways to accomplish this.
There is currently no way to trigger updates based on modifications to the database on Firebase servers. It is no big secret that we've been working on such functionality for a while now, but we have made no announcement as to when that will be available.
Also see Can I host a listener on Firebase?, which (I realize now) is probably a duplicate.

Persisting Dashboard Info for Glimpse for ASP.NET MVC

How do I persist Glimpse (for MVC4) information for historical purposes? For example, I would like to store specific dashboard data items (e.g., time on the wire) a database, per request, so as to create a chart based on that. I have searched all over the docs and forums for something like this, but I have not found anything really useful for setting up this use case.
This question may be related to How glimpse persists debugging information?. It suggests implementing IDataStore
However, if go down this route, how do I actually reference my interface implementation so my Glimpse installation will use it?
If you are only interested in persisting the data and getting it out independently (for your dashboard) that should be fairly easy. You will will probably want to inherit from ApplicationPersistenceStore (which implements IPersistenceStore) so that you get the out of the box behavior of the default PersistenceStore and just save off to your store before calling base.Seve(...).
In order to register the you will want to take a look at whats going on here. You will see that we look to the UserServiceLocator (which is a IServiceLocator) to see if you want to customize whats going on. To register your service locator, you can do this off the Glimpse config section. Here is an example of how to do it:
<glimpse serviceLocatorType="Glimpse.Test.Core.TestDoubles.DummyServiceLocator, Glimpse.Test.Core" ...>
Let me know how you get on.

Is there a way to set Event ID on EventLog sink (in Serilog)?

I took a look at Serilog.Sinks.EventLog at Github and noticed there doesn't seem to be a way to set the Event ID of the logged event (example IDs here).
Would there exist a way to modify the sink so that it'd be possible? Perhaps with some kind of specially formatted message? I don't know if I should put this here or on Github, I'll try here first. :)
There isn't a mechanism currently for this - designing one seems tricky (but ultimately it'd be a great addition to the project!)

Resources