更新 chassis

This commit is contained in:
BryantHe 2023-05-30 04:00:19 +08:00
parent b0bb0591bb
commit c5bf708190
2 changed files with 4 additions and 22 deletions

2
.gitignore vendored
View File

@ -122,7 +122,7 @@ celerybeat.pid
# Environments
*.env
.venv
*.venv
env/
venv/
ENV/

View File

@ -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()