From c5bf708190f7e7b83467fa3df3dfc7bb63eea1b2 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Tue, 30 May 2023 04:00:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20chassis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- chassis/chassis.py | 24 +++--------------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 4f6df00..f626f23 100644 --- a/.gitignore +++ b/.gitignore @@ -122,7 +122,7 @@ celerybeat.pid # Environments *.env -.venv +*.venv env/ venv/ ENV/ diff --git a/chassis/chassis.py b/chassis/chassis.py index 3317778..c80155d 100644 --- a/chassis/chassis.py +++ b/chassis/chassis.py @@ -1,6 +1,7 @@ import logging from logstash_formatter import LogstashFormatterV1 from statsd import StatsClient +from nameko_sentry import SentryReporter def init_statsd(prefix=None, host=None, port=8125): @@ -17,24 +18,5 @@ def init_logger(): return logger -def init_tracer(service): - from jaeger_client import Config - config = Config( - config={ - 'sampler': { - 'type': 'const', - 'param': 1, - }, - 'local_agent': { - 'reporting_host': "jaeger", - 'reporting_port': 5775, - }, - 'logging': True, - 'reporter_batch_size': 1, - }, - - service_name=service, - ) - - # this call also sets opentracing.tracer - return config.initialize_tracer() +def init_sentry(): + return SentryReporter() \ No newline at end of file