Giter Club home page Giter Club logo

librato-ios's People

Contributors

adamyanalunas avatar brlanier avatar nap-sam-dean avatar sergeykuryanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

librato-ios's Issues

Demo Reference Project

A basic demo project would be useful to see how things work and for reference for filing issues/bugs.

Add notification subscription

A simple helper to create subscriptions to notifications and perform metrics based off of notification type or data would be nice.

groupNamed:context: is a void function

Currently groupNamed:context: in Librato.h|m purports to return an NSArray but it's a void function. Interface and implementation files should be updated to reflect this.

Better description for LibratoMetric

Right now everything is dumped out, which isn't too helpful. Build a more succinct description with just name, value, measureTime and source.

Expose timed execution functionality

Currently nestled away in LibratoProcessor it needs integration into LibratoQueue by accepting, queuing and, potentially, auto-submitting the timed metric.

Automatically track metrics?

The librato gem does some automatic tracking of events.

Should the iOS version tap into anything during runtime? Time in app? Device and platform details? Cell/wi-fi usage?

Support offline caching and online rehydration

Library should know whether the device is offline and cache any metrics added to queues. When connectivity becomes available it should automatically attempt to send the cached metrics.

Additional helper APIs for counter metrics

Sometimes you want to create a metric with only a name and value. Sometimes you want to have the source and date as well. The dictionary is clumsy. Let's have class methods for common variations but leave the dictionary in for people who like that kind of thing.

Lock down method and property access

Private or protected methods and properties in places like LibratoProcessor have been defaulted to public. To keep internal state safe these should be locked down as much as possible.

Also, a review of and any possible updates needed in the rest of the rest of library should be considered fair game in this issue.

Default client to auto-submit

Would it be better to have metrics automatically submitted instead of pushing them with a [client submit] call? If so, would submitting happen immediately or in a queue then flush manner?

Additional API for grouped metrics

Do something like the gem's group command where arguments are a namespace string and then a block within which any metric created is automatically namespaced.

EDIT Should this deprecate the existing group API? The existing "add an array of metrics" is a different goal than this one and perhaps that task is better accomplished under a chunking/mass submit method.

Librato metrics failing due to improper source names

The Librato team let us know there are many failing entries due to invalid data in the source field. The example given was:

Response: {"errors":{"params":{"source":["[email protected] is not a valid source name"]}},"request_time":1476916671}, Body: {"counters":[{"value":1,"measure_time":1476916671,"source":"[email protected]","name":"cs.live.larousse-red_larousse-2-g7.open"},{"value":0,"measure_time":1476916671,"source":"[email protected]","name":"cs.live.larousse-red_larousse-2-g7.pageview"}]}

Sources should be text and '-', '_' only so the '@' in the email would cause this to fail.

Assertion failure when re-creating a Guage Metric from disk

This is failing when Mantle is trying to recreate the object from disk. I am unclear on what would be a clean solution. But seeing this very consistently in development. And it doesn't go away on restarting app as its persisted to disk.

I'll remove the assertion locally and continue on, but anyone has any ideas for a proper fix?

In LibratoGuageMetric.m:34, we have

- (instancetype)init
{
    NSAssert(false, @"You must use initWithName:valued:options: to initialize a LibratoGagueMetric instance");
    self = nil;

    return nil;
}

The stack trace:

*** Assertion failure in -[LibratoGaugeMetric init], /Pods/librato-iOS/librato-iOS/Metrics/LibratoGaugeMetric.m:34

2014-09-08 12:31:26.658 Myntra[28953:60b] *** Caught exception decoding value for key "models" on class LibratoMetricCollection: You must use initWithName:valued:options: to initialize a LibratoGagueMetric instance

2014-09-08 12:31:26.661 Myntra[28953:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'You must use initWithName:valued:options: to initialize a LibratoGagueMetric instance'

*** First throw call stack:
(
0   CoreFoundation                      0x0000000103cd5495 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x0000000103a3499e objc_exception_throw + 43
2   CoreFoundation                      0x0000000103cd531a +[NSException raise:format:arguments:] + 106
3   Foundation                          0x0000000101ad4f19 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
4   Myntra                              0x000000010035ab4e -[LibratoGaugeMetric init] + 174
5   Myntra                              0x00000001002f87d0 -[MTLModel initWithDictionary:error:] + 112
6   Myntra                              0x00000001002f793a -[MTLModel(NSCoding) initWithCoder:] + 2330
7   Foundation                          0x0000000101b01b8d _decodeObjectBinary + 2541
8   Foundation                          0x0000000101b02bc0 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1735
9   Foundation                          0x0000000101b02db3 -[NSArray(NSArray) initWithCoder:] + 201
10  Foundation                          0x0000000101b01b8d _decodeObjectBinary + 2541
11  Foundation                          0x0000000101b01042 _decodeObject + 288
12  Myntra                              0x00000001002f6e0a -[MTLModel(NSCoding) decodeValueForKey:withCoder:modelVersion:] + 1898
13  Myntra                              0x00000001002f779f -[MTLModel(NSCoding) initWithCoder:] + 1919
14  Foundation                          0x0000000101b01b8d _decodeObjectBinary + 2541
15  Foundation                          0x0000000101b02bc0 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1735
16  Foundation                          0x0000000101b0f041 -[NSDictionary(NSDictionary) initWithCoder:] + 202
17  Foundation                          0x0000000101b01b8d _decodeObjectBinary + 2541
18  Foundation                          0x0000000101b01042 _decodeObject + 288
19  Foundation                          0x0000000101ae1ac3 +[NSKeyedUnarchiver unarchiveObjectWithFile:] + 139
20  Myntra                              0x0000000100355ee2 -[LibratoClient unarchiveMetrics] + 226
21  Myntra                              0x000000010035596a -[LibratoClient handleForegroundNotificaiton:] + 58
22  CoreFoundation                      0x0000000103d2ad9c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
23  CoreFoundation                      0x0000000103c8d51d _CFXNotificationPost + 2381
24  Foundation                          0x0000000101afc7fa -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
25  UIKit                               0x00000001029ced06 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1898
26  UIKit                               0x00000001029d2a0c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 660
27  UIKit                               0x00000001029e3d4c -[UIApplication handleEvent:withNewEvent:] + 3189
28  UIKit                               0x00000001029e4216 -[UIApplication sendEvent:] + 79
29  UIKit                               0x00000001029d4086 _UIApplicationHandleEvent + 578
30  GraphicsServices                    0x000000010477271a _PurpleEventCallback + 762
31  GraphicsServices                    0x00000001047721e1 PurpleEventCallback + 35
32  CoreFoundation                      0x0000000103c57679 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
33  CoreFoundation                      0x0000000103c5744e __CFRunLoopDoSource1 + 478
34  CoreFoundation                      0x0000000103c80903 __CFRunLoopRun + 1939
35  CoreFoundation                      0x0000000103c7fd83 CFRunLoopRunSpecific + 467
36  UIKit                               0x00000001029d22e1 -[UIApplication _run] + 609
37  UIKit                               0x00000001029d3e33 UIApplicationMain + 1010
38  Myntra                              0x000000010004aa33 main + 115
39  libdyld.dylib                       0x000000010425a5fd start + 
40  ???                                 0x0000000000000001 0x0 + 1
)

libc++abi.dylib: terminating with uncaught exception of type NSException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.