Configure Contrast Pyramid middleware for the Python agent
In Pyramid, middlewares are called "tweens". See the example below for adding the Contrast middleware to a Pyramid application:
from pyramid.config import Configurator config = Configurator() config.add_tween('contrast.agent.middlewares.pyramid_middleware.PyramidMiddleware')
See the Pyramid documentation for additional details on tween configuration.