Skip to content

Commit f898a7e

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-appengine
2 parents 0143d5f + f8c35e5 commit f898a7e

68 files changed

Lines changed: 2177 additions & 2849 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 13 additions & 375 deletions
Large diffs are not rendered by default.

docs/config.rst

Lines changed: 368 additions & 141 deletions
Large diffs are not rendered by default.

docs/index.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. sentry:edition:: self
22
3-
Raven-Java
3+
Raven Java
44
==========
55

66
.. sentry:edition:: on-premise, hosted
@@ -10,23 +10,23 @@
1010
Java
1111
====
1212

13-
Raven is the Java client for Sentry. Raven relies on the most popular
14-
logging libraries to capture and convert logs before sending details to a
15-
Sentry instance.
16-
17-
While it's strongly recommended to use one of the supported logging
18-
frameworks to capture and send messages to Sentry, a it is possible to do
19-
so manually with the main project raven.
13+
Raven for Java (``raven-java``) is the official Java client for Sentry. At its core it provides
14+
a raw client for sending events to Sentry, but it is highly recommended that you
15+
use one of the included library or framework integrations listed below if at all possible.
2016

2117
.. toctree::
22-
:maxdepth: 2
23-
:titlesonly:
18+
:maxdepth: 2
19+
:titlesonly:
2420

25-
installation
26-
config
27-
modules/index
21+
config
22+
usage
23+
modules/index
2824

2925
Resources:
3026

27+
* `Documentation <https://docs.sentry.io/clients/java/>`_
3128
* `Bug Tracker <http://github.com/getsentry/raven-java/issues>`_
32-
* `Github Project <http://github.com/getsentry/raven-java>`_
29+
* `Code <http://github.com/getsentry/raven-java>`_
30+
* `Mailing List <https://groups.google.com/group/getsentry>`_
31+
* `IRC <irc://irc.freenode.net/sentry>`_ (irc.freenode.net, #sentry)
32+
* `Travis CI <http://travis-ci.org/getsentry/raven-java>`_

docs/installation.rst

Lines changed: 0 additions & 71 deletions
This file was deleted.

docs/modules/android.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Android
2+
=======
3+
4+
Installation
5+
------------
6+
7+
Using Gradle (Android Studio) in your ``app/build.gradle`` add:
8+
9+
.. sourcecode:: groovy
10+
11+
compile 'com.getsentry.raven:raven-android:7.8.2'
12+
13+
For other dependency managers see the `central Maven repository <https://search.maven.org/#artifactdetails%7Ccom.getsentry.raven%7Craven-android%7C7.8.2%7Cjar>`_.
14+
15+
Usage
16+
-----
17+
18+
Configure your Sentry DSN (client key) in your ``AndroidManifest.xml``:
19+
20+
.. sourcecode:: xml
21+
22+
<application>
23+
<meta-data
24+
android:name="com.getsentry.raven.android.DSN"
25+
android:value="https://publicKey:secretKey@host:port/1?options" />
26+
</application>
27+
28+
Your application must also have permission to access the internet in order to send
29+
event to the Sentry server. In your ``AndroidManifest.xml``:
30+
31+
.. sourcecode:: xml
32+
33+
<uses-permission android:name="android.permission.INTERNET" />
34+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
35+
36+
Then, in your application's ``onCreate``, initialize the Raven client:
37+
38+
.. sourcecode:: java
39+
40+
import com.getsentry.raven.android.Raven;
41+
42+
// "this" should be a reference to your main Activity
43+
Raven.init(this.getApplicationContext());
44+
45+
Now you can use ``Raven`` to capture events anywhere in your application:
46+
47+
.. sourcecode:: java
48+
49+
// Send a simple event to the Sentry server
50+
Raven.capture("Error message");
51+
52+
try {
53+
something()
54+
} catch (Exception e) {
55+
// Send an exception event to the Sentry server
56+
Raven.capture(e);
57+
}
58+
59+
// Or build an event manually
60+
EventBuilder eventBuilder = new EventBuilder()
61+
.withMessage("Exception caught")
62+
.withLevel(Event.Level.ERROR);
63+
Raven.capture(eventBuilder.build());

docs/modules/appengine.rst

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
Google App Engine
22
=================
33

4-
The `raven-appengine` module enables the support of the async connections
5-
in Google App Engine.
4+
The ``raven-appengine`` library provides `Google App Engine <https://cloud.google.com/appengine/>`_
5+
support for Raven via the `Task Queue API
6+
<https://cloud.google.com/appengine/docs/java/taskqueue/>`_.
67

7-
The project can be found on github: `raven-java/appengine
8-
<https://github.com/getsentry/raven-java/tree/master/raven-appengine>`_
9-
10-
Google App Engine doesn't support threads but provides instead a
11-
TaskQueueing system allowing tasks to be run in the background.
12-
13-
This module replaces the async system provided by default with one relying
14-
on the tasks.
15-
16-
This module is not useful outside of Google App Engine.
8+
The source can be found `on Github
9+
<https://github.com/getsentry/raven-java/tree/master/raven-appengine>`_.
1710

1811
Installation
1912
------------
2013

21-
If you want to use Maven you can install Raven-AppEngine as dependency:
14+
Using Maven:
2215

2316
.. sourcecode:: xml
2417

@@ -28,25 +21,37 @@ If you want to use Maven you can install Raven-AppEngine as dependency:
2821
<version>7.8.2</version>
2922
</dependency>
3023

24+
Using Gradle:
25+
26+
.. sourcecode:: groovy
27+
28+
compile 'com.getsentry.raven:raven-appengine:7.8.2'
29+
30+
Using SBT:
31+
32+
.. sourcecode:: scala
33+
34+
libraryDependencies += "com.getsentry.raven" % "raven-appengine" % "7.8.2"
35+
36+
For other dependency managers see the `central Maven repository <https://search.maven.org/#artifactdetails%7Ccom.getsentry.raven%7Craven-appengine%7C7.8.2%7Cjar>`_.
37+
3138
Usage
3239
-----
3340

34-
This module provides a new ``RavenFactory`` which replaces the default async
35-
system with a GAE compatible one.
41+
This module provides a new ``RavenFactory`` implementation which replaces the default async
42+
system with a Google App Engine compatible one. You'll need to configure Raven to use the
43+
``com.getsentry.raven.appengine.AppEngineRavenFactory`` as its factory.
3644

3745
The queue size and thread options will not be used as they are specific to
38-
the default multithreaded system.
39-
40-
It is necessary to force the raven factory name to
41-
``com.getsentry.raven.appengine.AppEngineRavenFactory``.
46+
the default Java threading system.
4247

4348
Queue Name
4449
----------
4550

4651
By default, the default task queue will be used, but it's possible to
4752
specify which one will be used with the ``raven.async.gae.queuename`` option::
4853

49-
___DSN___?raven.async.gae.queuename=MyQueueName
54+
http://public:private@host:port/1?raven.async.gae.queuename=MyQueueName
5055

5156
Connection Name
5257
---------------
@@ -55,7 +60,7 @@ As the queued tasks are sent across different instances of the
5560
application, it's important to be able to identify which connection should
5661
be used when processing the event. To do so, the GAE module will identify
5762
each connection based on an identifier either automatically generated or
58-
user defined. TO manually set the connection identifier (only used
59-
internally) use the option ``raven.async.connectionid``::
63+
user defined. To manually set the connection identifier (only used
64+
internally) use the option ``raven.async.gae.connectionid``::
6065

61-
___DSN___?raven.async.gae.connectionid=MyConnection
66+
http://public:private@host:port/1?raven.async.gae.connectionid=MyConnection

docs/modules/index.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
Modules
2-
=======
1+
Integrations
2+
============
33

4-
Raven-Java comes in different modules from low-level access to event
5-
submission as well as integration into different packages.
4+
The Raven Java SDK comes with support for some frameworks and libraries so that
5+
you don't have to capture and send errors manually.
66

77
.. toctree::
88
:maxdepth: 1
99

10+
android
11+
appengine
1012
raven
1113
log4j
1214
log4j2
1315
logback
14-
appengine

0 commit comments

Comments
 (0)