@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface FoamApiKeys
Example usage:
@FoamApiKeys(
pagerDuty = "3a3b3c3d3e3f3g3h3i3j3k3l3m3n3o3p",
papertrail = "logs2.papertrailapp.com:49999",
hockeyApp = "b2044c3055d4066e5077f6088g7099h8",
flurry = "S6S7S8S9S0S1S2S3S4S5"
mixpanel = "221b331c441d551e661f771g881h991i",
googleAnalytics = "UA-00000000-1",
logentries = "data.logentries.com:12345",
)
public class MyApplication extends FoamApplication {
}
You can also enable a subset of services:
@FoamApiKeys(
mixpanel = "221b331c441d551e661f771g881h991i",
hockeyApp = "b2044c3055d4066e5077f6088g7099h8",
papertrail = "logs2.papertrailapp.com:49999"
)
public class MyApplication extends FoamApplication {
}
For further instructions including information on where to find API keys for various services,
see: https://github.com/percolate/foam| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
flurry
Flurry Application Key
|
java.lang.String |
googleAnalytics
Google Analytics Tracking ID
|
java.lang.String |
graphite
Graphite Server URL
|
java.lang.String |
hockeyApp
HockeyApp API token.
|
java.lang.String |
logentries
Logentries Server URL
|
java.lang.String |
mixpanel
Mixpanel project token
|
java.lang.String |
pagerDuty
PagerDuty API Key
|
java.lang.String |
papertrail
Papertrail URL
|
boolean |
wifiOnly
Only send data when client is connected to WiFi.
|
public abstract java.lang.String hockeyApp
Instructions: Click your name (top right) -> API Tokens -> Create an API token. (permissions can be set to "Read Only")
public abstract java.lang.String papertrail
Instructions: Add a system. You'll see "Your systems will log to <url>". Use this URL.
public abstract java.lang.String pagerDuty
Instructions: Configuration -> API Access -> Create API Key
public abstract java.lang.String logentries
Instructions Add a new log -> Select Manual (Gear icon) -> Change "How are the logs sent?" to "Plain TCP, UDP - logs are sent via syslog." -> Click create. You will get back "Start sending logs to <url>". Use this URL.
public abstract java.lang.String mixpanel
Instructions: Your project 'Token' can be found under "Update project settings" (gear icon on the bottom left).
public abstract java.lang.String googleAnalytics
Instructions: Create a new Property -> Select "Mobile App" -> Click "Get Tracking ID".
public abstract java.lang.String flurry
Instructions: Create an application in Flurry then add your application key.
Note: FlurryAnalytics-x.x.x.jar must be added manually to your project.