mirror of
https://gitea.bearcatlog.com/Bryant/chassis
synced 2025-01-19 02:24:43 +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
|
# Environments
|
||||||
*.env
|
*.env
|
||||||
.venv
|
*.venv
|
||||||
env/
|
env/
|
||||||
venv/
|
venv/
|
||||||
ENV/
|
ENV/
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from logstash_formatter import LogstashFormatterV1
|
from logstash_formatter import LogstashFormatterV1
|
||||||
from statsd import StatsClient
|
from statsd import StatsClient
|
||||||
|
from nameko_sentry import SentryReporter
|
||||||
|
|
||||||
|
|
||||||
def init_statsd(prefix=None, host=None, port=8125):
|
def init_statsd(prefix=None, host=None, port=8125):
|
||||||
@ -17,24 +18,5 @@ def init_logger():
|
|||||||
return logger
|
return logger
|
||||||
|
|
||||||
|
|
||||||
def init_tracer(service):
|
def init_sentry():
|
||||||
from jaeger_client import Config
|
return SentryReporter()
|
||||||
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()
|
|
Loading…
Reference in New Issue
Block a user