mirror of
https://gitea.bearcatlog.com/Bryant/chassis
synced 2025-01-18 18:25:21 +08:00
更新 chassis
This commit is contained in:
parent
b0bb0591bb
commit
c5bf708190
2
.gitignore
vendored
2
.gitignore
vendored
@ -122,7 +122,7 @@ celerybeat.pid
|
||||
|
||||
# Environments
|
||||
*.env
|
||||
.venv
|
||||
*.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
|
@ -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()
|
Loading…
Reference in New Issue
Block a user