v0.25.0
New Features
baseplate-tshell
You can now fire up a REPL shell in a Thrift service's context for debugging. This is patterened off of pshell
from Pyramid and supports IPython's REPL if installed.
$ baseplate-tshell2 example.ini
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
Type "copyright", "credits" or "license" for more information.
IPython 2.2.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Available Objects:
app This project's app instance
context The context for this shell instance's span
In [1]: context.redis.ping()
Out[1]: True
Changes
- Multiple increments of the same statsd counter in the same batch are now coalesced together before serialization to reduce metric datagram size. This reduces bandwidth usage for most non-trivial applications since span success/failure counters happen often.
- Exceptions raised from the OS during MessageQueue instantiation now come with hints of how to resolve the issue.
- Event logging in the experiments framework is now extensible and defaults to just logging at DEBUG level.
- Success/failure counters (added in v0.20) are now sent for server spans as well as client spans.
- The
EdgeRequestContext
now has aservice
property for use when the request's authentication token identifies an (internal) service rather than a user as the principal. The object has a singlename
property to get the authenticated service's name. This can be used to whitelist services for specific multi-user access to data.
Bug Fixes
- Fix a crash in the
MetricsBaseplateObserver
when a metrics batch gets too big for IP fragmentation. Just log a warning and swallow the error now. - Don't put connections back in thrift connection pool after unexpected low-level errors from the remote application. This was a cause for at least some "TTransportException: read 0 bytes" errors since the connection was broken but had been returned to the pool for the next request to fail on.
- Fix baseplate-healthcheck3 against UNIX domain socket endpoints. There was a Python 3 incompatibility.
- Include Makefile in setuptools MANIFEST.
Upgrading
Event logging
Remove the event_queue
parameter from your ExperimentsContextFactory
object and add an appropriately constructed EventLogger
instead.