Exemplo n.º 1
0
 def _trace_app_not_distributed(self, tracer=None):
     self.app.install(
         TracePlugin(service=SERVICE,
                     tracer=tracer,
                     distributed_tracing=False))
     self.app = webtest.TestApp(self.app)
Exemplo n.º 2
0
 def _trace_app(self, tracer=None):
     self.app.install(TracePlugin(service=SERVICE, tracer=tracer))
     self.app = webtest.TestApp(self.app)
Exemplo n.º 3
0
def _trace_app(app):
    tracer = get_dummy_tracer()
    app.install(TracePlugin(service=SERVICE, tracer=tracer))
    return tracer, webtest.TestApp(app)
Exemplo n.º 4
0
 def _trace_app_not_distributed(self, tracer=None):
     ddtrace.config.bottle["distributed_tracing"] = False
     self.app.install(TracePlugin(service=SERVICE, tracer=tracer))
     self.app = webtest.TestApp(self.app)
Exemplo n.º 5
0
 def _trace_app_distributed(self, tracer=None):
     # DD_BOTTLE_DISTRIBUTED_TRACING enabled by default
     self.app.install(TracePlugin(service=SERVICE, tracer=tracer))
     self.app = webtest.TestApp(self.app)
Exemplo n.º 6
0
from bottle import route, run, template, install
from ddtrace import tracer
from ddtrace.contrib.bottle import TracePlugin


@route('/')
def index():
    return 'hello'


plugin = TracePlugin(service="my-web-app")
install(plugin)
run(host='0.0.0.0', port=8000)