Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jaeger extra tags #832

Merged
merged 1 commit into from
Aug 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion python/seldon_core/microservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ def main():

parameters = parse_parameters(json.loads(args.parameters))

# set flask trace jaeger extra tags
jaeger_extra_tags = list(filter(lambda x: (x != ""), [tag.strip() for tag in os.environ.get("JAEGER_EXTRA_TAGS", "").split(",")]))
logger.info('Parse JAEGER_EXTRA_TAGS %s', jaeger_extra_tags)
# set up log level
log_level_raw = os.environ.get(LOG_LEVEL_ENV, args.log_level.upper())
log_level_num = getattr(logging, log_level_raw, None)
Expand Down Expand Up @@ -269,8 +272,10 @@ def rest_prediction_server():
except (NotImplementedError, AttributeError):
pass
if args.tracing:
logger.info('Tracing branch is active')
from flask_opentracing import FlaskTracer
tracing = FlaskTracer(tracer, True, app)
logger.info('Set JAEGER_EXTRA_TAGS %s', jaeger_extra_tags)
tracing = FlaskTracer(tracer, True, app, jaeger_extra_tags)

app.run(host='0.0.0.0', port=port)

Expand Down