Browse Source

Merge branch 'master' into drf-api

Conflicts:
	setup.py
David Cramer 11 years ago
parent
commit
8268871538
10 changed files with 116 additions and 32 deletions
  1. 0 2
      .travis.yml
  2. 14 1
      CHANGES
  3. 2 2
      LICENSE
  4. 12 12
      Makefile
  5. 3 2
      conftest.py
  6. 1 1
      docs/buffer/index.rst
  7. 1 1
      docs/conf.py
  8. 47 0
      docs/config/index.rst
  9. 35 10
      docs/developer/client/index.rst
  10. 1 1
      docs/faq/index.rst

+ 0 - 2
.travis.yml

@@ -52,5 +52,3 @@ notifications:
     channels: "irc.freenode.org#sentry"
     on_success: change
     on_failure: change
-after_success:
-  - coveralls

+ 14 - 1
CHANGES

@@ -1,7 +1,13 @@
 Version 6.4.0
 -------------
 
-Some major backend changes are introduced in Sentry 6.3.0.
+Some major backend changes are introduced in Sentry 6.4.0.
+
+django.contrib.auth
+===================
+
+The builtin Django authentication module is no more. The Group and Permission models are no
+longer used, and the User model has been replaced with sentry.User.
 
 Search
 ======
@@ -27,6 +33,13 @@ Additional Changes
 - Charts now show tooltips describing the datapoint.
 - JavaScript sourcemaps now support embedded sources.
 - Stream annotations can now be customized to show any tags (not just number of users).
+- Stacktrace frames now get truncated down to a maximum length of 50.
+
+Protocol Version 5
+==================
+
+- sentry_version should be sent as '5'.
+- The stacktrace interface now accepts a 'frames_omitted' tuple.
 
 Version 6.3.0
 -------------

+ 2 - 2
LICENSE

@@ -1,4 +1,4 @@
-Copyright (c) 2009 David Cramer and individual contributors.
+Copyright (c) 2014 David Cramer and individual contributors.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
 
     3. Neither the name of the Sentry nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 12 - 12
Makefile

@@ -11,23 +11,23 @@ JS_REPORTER = dot
 develop: update-submodules
 	npm install -q
 	# order matters here, base package must install first
-	pip install -q -e . --use-mirrors
-	pip install -q "file://`pwd`#egg=sentry[dev]" --use-mirrors
-	pip install -q "file://`pwd`#egg=sentry[tests]" --use-mirrors
+	pip install -q -e .
+	pip install -q "file://`pwd`#egg=sentry[dev]"
+	pip install -q "file://`pwd`#egg=sentry[tests]"
 	make setup-git
 
 dev-postgres:
-	pip install -q -e . --use-mirrors
-	pip install -q "file://`pwd`#egg=sentry[dev]" --use-mirrors
-	pip install -q "file://`pwd`#egg=sentry[postgres]" --use-mirrors
+	pip install -q -e .
+	pip install -q "file://`pwd`#egg=sentry[dev]"
+	pip install -q "file://`pwd`#egg=sentry[postgres]"
 
 dev-mysql:
-	pip install -q -e . --use-mirrors
-	pip install -q "file://`pwd`#egg=sentry[dev]" --use-mirrors
-	pip install -q "file://`pwd`#egg=sentry[mysql]" --use-mirrors
+	pip install -q -e .
+	pip install -q "file://`pwd`#egg=sentry[dev]"
+	pip install -q "file://`pwd`#egg=sentry[mysql]"
 
 dev-docs:
-	pip install -q -r docs/requirements.txt --use-mirrors
+	pip install -q -r docs/requirements.txt
 
 setup-git:
 	git config branch.autosetuprebase always
@@ -58,7 +58,7 @@ update-submodules:
 test: develop lint test-js test-python test-cli
 
 testloop: develop
-	pip install pytest-xdist --use-mirrors
+	pip install pytest-xdist
 	py.test tests -f
 
 test-cli:
@@ -66,7 +66,7 @@ test-cli:
 	rm -rf test_cli
 	mkdir test_cli
 	cd test_cli && sentry init test.conf
-	cd test_cli && sentry --config=test.conf upgrade --verbosity=0 --noinput
+	cd test_cli && sentry --config=test.conf upgrade --traceback --noinput
 	cd test_cli && sentry --config=test.conf help | grep start > /dev/null
 	rm -r test_cli
 

+ 3 - 2
conftest.py

@@ -1,5 +1,4 @@
 from django.conf import settings
-import base64
 import os
 import os.path
 
@@ -57,7 +56,8 @@ def pytest_configure(config):
     settings.INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
         'tests',
     )
-    settings.SENTRY_KEY = base64.b64encode(os.urandom(40))
+    # Need a predictable key for tests that involve checking signatures
+    settings.SENTRY_KEY = 'abc123'
     settings.SENTRY_PUBLIC = False
     # This speeds up the tests considerably, pbkdf2 is by design, slow.
     settings.PASSWORD_HASHERS = [
@@ -67,3 +67,4 @@ def pytest_configure(config):
     # enable draft features
     settings.SENTRY_ENABLE_EXPLORE_CODE = True
     settings.SENTRY_ENABLE_EXPLORE_USERS = True
+    settings.SENTRY_ENABLE_EMAIL_REPLIES = True

+ 1 - 1
docs/buffer/index.rst

@@ -18,7 +18,7 @@ To specify a backend, simply modify the ``SENTRY_BUFFER`` and ``SENTRY_BUFFER_OP
 
     SENTRY_BUFFER = 'sentry.buffer.base.Buffer'
     SENTRY_BUFFER_OPTIONS = {
-        'delay': 5,  # delay for queued tasks
+        'delay': 5,  # delay for queued tasks, in second(s)
     }
 
 The Redis Backend

+ 1 - 1
docs/conf.py

@@ -55,7 +55,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'Sentry'
-copyright = u'2010-2013, the Sentry Team'
+copyright = u'2010-2014, the Sentry Team'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the

+ 47 - 0
docs/config/index.rst

@@ -175,6 +175,53 @@ The following settings are available for the built-in UDP API server:
 
         SENTRY_UDP_PORT = 9001
 
+.. data:: SENTRY_USE_IPV6_UDP
+    :noindex:
+
+    Instruct the UDP server to bind to an ipv6 address.
+
+    Defaults to ``False``.
+
+.. _config-smtp-server:
+
+SMTP Server
+~~~~~~~~~~~
+
+The following settings are available for the built-in SMTP mail server:
+
+.. data:: SENTRY_SMTP_HOST
+    :noindex:
+
+    The hostname which the smtp server should bind to.
+
+    Defaults to ``localhost``.
+
+    ::
+
+        SENTRY_SMTP_HOST = '0.0.0.0'  # bind to all addresses
+
+.. data:: SENTRY_SMTP_PORT
+    :noindex:
+
+    The port which the smtp server should listen on.
+
+    Defaults to ``1025``.
+
+    ::
+
+        SENTRY_SMTP_PORT = 1025
+
+.. data:: SENTRY_SMTP_HOSTNAME
+    :noindex:
+
+    The hostname which matches the server's MX record.
+
+    Defaults to ``localhost``.
+
+    ::
+
+        SENTRY_SMTP_HOSTNAME = 'reply.getsentry.com'
+
 
 Data Sampling
 -------------

+ 35 - 10
docs/developer/client/index.rst

@@ -1,7 +1,7 @@
 Writing a Client
 ================
 
-.. note:: This document describes protocol version 4.
+.. note:: This document describes protocol version 5.
 
 A client at its core is simply a set of utilities for capturing various
 logging parameters. Given these parameters, it then builds a JSON payload
@@ -342,7 +342,7 @@ Authentication
 
 An authentication header is expected to be sent along with the message body, which acts as as an ownership identifier::
 
-    X-Sentry-Auth: Sentry sentry_version=4,
+    X-Sentry-Auth: Sentry sentry_version=5,
     sentry_client=<client version, arbitrary>,
     sentry_timestamp=<current timestamp>,
     sentry_key=<public api key>,
@@ -353,7 +353,7 @@ An authentication header is expected to be sent along with the message body, whi
 
 .. data:: sentry_version
 
-    The protocol version. This should be sent as the value '4'.
+    The protocol version. This should be sent as the value '5'.
 
 .. data:: sentry_client
 
@@ -399,12 +399,11 @@ The request body should then somewhat resemble the following::
 
     POST /api/project-id/store/
     User-Agent: raven-python/1.0
-    X-Sentry-Auth: Sentry sentry_version=4, sentry_timestamp=1329096377,
+    X-Sentry-Auth: Sentry sentry_version=5, sentry_timestamp=1329096377,
         sentry_key=b70a31b3510c4cf793964a185cfe1fd0, sentry_client=raven-python/1.0,
         sentry_secret=b7d80b520139450f903720eb7991bf3d
 
     {
-        "project": "project-id",
         "event_id": "fc6d8c0c43fc4630ad850ee518f1b9d0",
         "culprit": "my.module.function_name",
         "timestamp": "2011-05-02T17:41:36",
@@ -544,10 +543,35 @@ The client should send the following upstream for ``tags``::
         ],
     }
 
-If your platform supports it, block level context should also be available::
+You should also provide relevant contextual interfaces. These should last for the lifecycle of a request, and the general interface is "bind some kind of context", and then at the end of a request lifecycle, clear any present context.
+
+This interface consists of *_context methods, as well as a "clear context" method. The following is an example API which is implemented in most clients:
+
+::
+
+    # Bind sentry.interfaces.User
+    client.user_context({
+        'email': 'foo@example.com',
+    })
+
+    # Merge in additional tag context
+    client.tags_context({
+        'key': 'value',
+    })
+
+    # Merge in additional extra context
+    client.extra_context({
+        'key': 'value',
+    })
+
+    # Clear context
+    client.context.clear()
+
+Some additional examples of context helpers which might be relevant:
+
+- http_context(data) -- bind sentry.interfaces.Http
+- wsgi_context(env) -- bind http_context based on a wsgi environment
 
-    with client.context({'tags': {'foo': 'bar'}}):
-        # ...
 
 Variable Size
 -------------
@@ -563,6 +587,7 @@ as things like extra data, or tags.
 - Tag values are limited to 200 characters.
 - Culprits are limited to 200 characters.
 - Most contextual variables are limited to 512 characters.
-- Extra contextual data is limited to 2048 characters.
-- Messages are limited to 1024 * 10 characters.
+- Extra contextual data is limited to 4096 characters.
+- Messages are limited to ~10kb.
 - Http data (the body) is limited to 2048 characters.
+- Stacktrace's are limited to 50 frames. If more are sent, data will be removed from the middle of the stack.

+ 1 - 1
docs/faq/index.rst

@@ -27,7 +27,7 @@ How do I
      configure()
 
      # Do something crazy
-     from sentry.models import Team, Project, User
+     from sentry.models import Team, Project, ProjectKey, User
 
      user = User()
      user.username = 'admin'

Some files were not shown because too many files changed in this diff