Skip to content
This repository was archived by the owner on Jul 21, 2021. It is now read-only.

Commit 2a5db5a

Browse files
LS-5330: Make Proto over HTTP the default transport
1 parent bbc90d5 commit 2a5db5a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

examples/trivial/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def lightstep_tracer_from_args():
6767
dest="no_tls", action='store_true')
6868
parser.add_argument('--component_name', help='The LightStep component name',
6969
default='TrivialExample')
70-
parser.add_argument('--use_http', help='Use proto over http',
71-
dest="use_http", action='store_true')
70+
parser.add_argument('--use_thrift', help='Use Thrift over http',
71+
dest="use_thrift", action='store_true')
7272
args = parser.parse_args()
7373

7474
if args.no_tls:
@@ -83,8 +83,8 @@ def lightstep_tracer_from_args():
8383
collector_port=args.port,
8484
verbosity=1,
8585
collector_encryption=collector_encryption,
86-
use_thrift=not args.use_http,
87-
use_http=args.use_http)
86+
use_thrift=args.use_thrift,
87+
use_http=not args.use_thrift)
8888

8989

9090
if __name__ == '__main__':

lightstep/recorder.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def __init__(self,
4444
periodic_flush_seconds=constants.FLUSH_PERIOD_SECS,
4545
verbosity=0,
4646
certificate_verification=True,
47-
use_thrift=True,
48-
use_http=False):
47+
use_thrift=False,
48+
use_http=True):
4949
self.verbosity = verbosity
5050
# Fail fast on a bad access token
5151
if not isinstance(access_token, str):
@@ -55,12 +55,12 @@ def __init__(self,
5555
warnings.warn('SSL CERTIFICATE VERIFICATION turned off. ALL FUTURE HTTPS calls will be unverified.')
5656
ssl._create_default_https_context = ssl._create_unverified_context
5757

58-
if use_thrift:
59-
self.use_thrift = True
60-
self.converter = ThriftConverter()
61-
elif use_http:
58+
if use_http:
6259
self.use_thrift = False
6360
self.converter = HttpConverter()
61+
elif use_thrift:
62+
self.use_thrift = True
63+
self.converter = ThriftConverter()
6464
else:
6565
raise Exception('Either use_thrift or use_http must be True')
6666

0 commit comments

Comments
 (0)