Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pump, Cedric
lab-tracing
Commits
ca021b8e
Commit
ca021b8e
authored
Dec 27, 2020
by
Nane Kratzke
Browse files
tracer setting
parent
5f2b40c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
hiphop/service.py
View file @
ca021b8e
...
@@ -22,8 +22,8 @@ config = Config(config = {
...
@@ -22,8 +22,8 @@ config = Config(config = {
'reporter_batch_size'
:
1
'reporter_batch_size'
:
1
},
service_name
=
service
)
},
service_name
=
service
)
jaeger_
tracer
=
config
.
initialize_tracer
()
tracer
=
config
.
initialize_tracer
()
tracing
=
FlaskTracing
(
jaeger_
tracer
,
True
,
app
)
tracing
=
FlaskTracing
(
tracer
,
True
,
app
)
@
app
.
route
(
'/'
)
@
app
.
route
(
'/'
)
def
index
():
def
index
():
...
@@ -33,7 +33,7 @@ def index():
...
@@ -33,7 +33,7 @@ def index():
def
hip
():
def
hip
():
r
=
""
r
=
""
try
:
try
:
parent_span
=
flask_
tracer
.
get_span
()
parent_span
=
tracer
.
get_span
()
with
opentracing
.
tracer
.
start_span
(
f
"
{
service
}
-
{
tier
+
1
}
"
,
child_of
=
parent_span
)
as
span
:
with
opentracing
.
tracer
.
start_span
(
f
"
{
service
}
-
{
tier
+
1
}
"
,
child_of
=
parent_span
)
as
span
:
url
=
f
"http://
{
service
}
-
{
tier
+
1
}
"
url
=
f
"http://
{
service
}
-
{
tier
+
1
}
"
span
.
set_tag
(
"http.url"
,
url
)
span
.
set_tag
(
"http.url"
,
url
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment