From bbc90d59bb0f771418f8e75da3afc7ded2681824 Mon Sep 17 00:00:00 2001 From: Sarah Haskins Date: Wed, 5 Sep 2018 14:43:34 -0400 Subject: [PATCH] LS-5330: Make TLS the default collector_encryption This was the default before my proto change. And I noticed this open PR https://github.com/lightstep/lightstep-tracer-python/pull/43 which had some feedback about that. --- examples/http/context_in_headers.py | 10 +++++----- examples/nontrivial/main.py | 10 +++++----- examples/trivial/main.py | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/http/context_in_headers.py b/examples/http/context_in_headers.py index b3c2a97..630c4a2 100644 --- a/examples/http/context_in_headers.py +++ b/examples/http/context_in_headers.py @@ -122,16 +122,16 @@ def lightstep_tracer_from_args(): default='collector.lightstep.com') parser.add_argument('--port', help='The LightStep reporting service port.', type=int, default=443) - parser.add_argument('--use_tls', help='Use TLS for reporting', - dest="use_tls", action='store_true') + parser.add_argument('--no_tls', help='Disable TLS for reporting', + dest="no_tls", action='store_true') parser.add_argument('--component_name', help='The LightStep component name', default='TrivialExample') args = parser.parse_args() - if args.use_tls: - collector_encryption = 'tls' - else: + if args.no_tls: collector_encryption = 'none' + else: + collector_encryption = 'tls' return lightstep.Tracer( component_name=args.component_name, diff --git a/examples/nontrivial/main.py b/examples/nontrivial/main.py index f25b92b..cb0323e 100644 --- a/examples/nontrivial/main.py +++ b/examples/nontrivial/main.py @@ -70,16 +70,16 @@ def lightstep_tracer_from_args(): default='collector.lightstep.com') parser.add_argument('--port', help='The LightStep reporting service port.', type=int, default=443) - parser.add_argument('--use_tls', help='Use TLS for reporting', - dest="use_tls", action='store_true') + parser.add_argument('--no_tls', help='Disable TLS for reporting', + dest="no_tls", action='store_true') parser.add_argument('--component_name', help='The LightStep component name', default='NonTrivialExample') args = parser.parse_args() - if args.use_tls: - collector_encryption = 'tls' - else: + if args.no_tls: collector_encryption = 'none' + else: + collector_encryption = 'tls' return lightstep.Tracer( component_name=args.component_name, diff --git a/examples/trivial/main.py b/examples/trivial/main.py index 5c2fc83..befb63d 100644 --- a/examples/trivial/main.py +++ b/examples/trivial/main.py @@ -63,18 +63,18 @@ def lightstep_tracer_from_args(): default='collector.lightstep.com') parser.add_argument('--port', help='The LightStep reporting service port.', type=int, default=443) - parser.add_argument('--use_tls', help='Use TLS for reporting', - dest="use_tls", action='store_true') + parser.add_argument('--no_tls', help='Disable TLS for reporting', + dest="no_tls", action='store_true') parser.add_argument('--component_name', help='The LightStep component name', default='TrivialExample') parser.add_argument('--use_http', help='Use proto over http', dest="use_http", action='store_true') args = parser.parse_args() - if args.use_tls: - collector_encryption = 'tls' - else: + if args.no_tls: collector_encryption = 'none' + else: + collector_encryption = 'tls' return lightstep.Tracer( component_name=args.component_name,