Open sandstrom opened 2 years ago
Hi @sandstrom,
We've been working on improving our metrics SDKs and are going to slip the first request into the upcoming update. I think it's a great idea.
The second request, a direct API call without middleware, is one we will eventually be adding to all of our SDKs. We've already added it to the node sdk but I don't have a timeline on when we'll get to it for the ruby sdk.
Let me know if this unblocks you, or if the second request is necessary to move forward.
@Dashron Thanks for a quick reply!
We'll probably wait for the direct call. But great to know that it's on the horizon!
Hopefully there will still be the batching + some mechanism such that failed submission of metrics won't interfere with the ruby process in any way. Always an important thing with stuff running in-memory like this.
In case it's helpful, the Ruby tracing product Skylight has a gem which does something similar to you. They send trace data for basically every request (they are not a competitor, but their product is very similar in that it will ingest request data from running Ruby applications).
Maybe their gem has something interesting that could be of use to you: https://github.com/skylightio/skylight-ruby
Thanks for the tip, we'll keep it in mind!
Skipping requests
We'd like to skip requests on a per-request basis. Basically, only requests from our customers sandbox accounts should be sent, for privacy reasons.
If we could return false from the block, or send e.g.
{ :ignore => true }
that would be great.Easier Rails Integration
We have a bunch of logic in our Rails ApplicationController, that will run authentication, etc. We'll lookup the company based on the API key, and only after we've checked which account it is, do we know if we want to sent this to Readme.
More specifically, we only want to send Metrics for certain sandbox accounts (for privacy and contractual reasons we cannot send any production data).
With the middleware approach this gets complicated.
We'd rather do something like this:
This would also solve the first item, sending only some requests, since in this example sending a request is opt-in.