Skip to content

Commit 17d8075

Browse files
committed
Prettier example.
1 parent 1805cce commit 17d8075

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

example/simple.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1+
# encoding=utf-8
12
import sys
2-
import instana.options as o
3+
from instana import options as o
34
import logging
45
import opentracing as ot
5-
import instana.tracer
6+
from instana import tracer
67
import time
78
import opentracing.ext.tags as ext
89

9-
SERVICE = "python-overlord"
10+
SERVICE = "🦄 Stan ❤️s Python 🦄"
11+
1012

1113
def main(argv):
12-
instana.tracer.init(o.Options(service=SERVICE,
13-
log_level=logging.DEBUG))
14+
tracer.init(o.Options(service=SERVICE,
15+
log_level=logging.DEBUG))
1416

1517
while (True):
1618
time.sleep(2)
1719
simple()
20+
time.sleep(200)
21+
1822

1923
def simple():
2024
parent_span = ot.tracer.start_span(operation_name="asteroid")
@@ -40,5 +44,6 @@ def simple():
4044
time.sleep(.2)
4145
parent_span.finish()
4246

47+
4348
if __name__ == "__main__":
4449
main(sys.argv)

0 commit comments

Comments
 (0)