Skip to content

Commit bbc90d5

Browse files
LS-5330: Make TLS the default collector_encryption
This was the default before my proto change. And I noticed this open PR #43 which had some feedback about that.
1 parent b3a2b33 commit bbc90d5

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

examples/http/context_in_headers.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,16 @@ def lightstep_tracer_from_args():
122122
default='collector.lightstep.com')
123123
parser.add_argument('--port', help='The LightStep reporting service port.',
124124
type=int, default=443)
125-
parser.add_argument('--use_tls', help='Use TLS for reporting',
126-
dest="use_tls", action='store_true')
125+
parser.add_argument('--no_tls', help='Disable TLS for reporting',
126+
dest="no_tls", action='store_true')
127127
parser.add_argument('--component_name', help='The LightStep component name',
128128
default='TrivialExample')
129129
args = parser.parse_args()
130130

131-
if args.use_tls:
132-
collector_encryption = 'tls'
133-
else:
131+
if args.no_tls:
134132
collector_encryption = 'none'
133+
else:
134+
collector_encryption = 'tls'
135135

136136
return lightstep.Tracer(
137137
component_name=args.component_name,

examples/nontrivial/main.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ def lightstep_tracer_from_args():
7070
default='collector.lightstep.com')
7171
parser.add_argument('--port', help='The LightStep reporting service port.',
7272
type=int, default=443)
73-
parser.add_argument('--use_tls', help='Use TLS for reporting',
74-
dest="use_tls", action='store_true')
73+
parser.add_argument('--no_tls', help='Disable TLS for reporting',
74+
dest="no_tls", action='store_true')
7575
parser.add_argument('--component_name', help='The LightStep component name',
7676
default='NonTrivialExample')
7777
args = parser.parse_args()
7878

79-
if args.use_tls:
80-
collector_encryption = 'tls'
81-
else:
79+
if args.no_tls:
8280
collector_encryption = 'none'
81+
else:
82+
collector_encryption = 'tls'
8383

8484
return lightstep.Tracer(
8585
component_name=args.component_name,

examples/trivial/main.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ def lightstep_tracer_from_args():
6363
default='collector.lightstep.com')
6464
parser.add_argument('--port', help='The LightStep reporting service port.',
6565
type=int, default=443)
66-
parser.add_argument('--use_tls', help='Use TLS for reporting',
67-
dest="use_tls", action='store_true')
66+
parser.add_argument('--no_tls', help='Disable TLS for reporting',
67+
dest="no_tls", action='store_true')
6868
parser.add_argument('--component_name', help='The LightStep component name',
6969
default='TrivialExample')
7070
parser.add_argument('--use_http', help='Use proto over http',
7171
dest="use_http", action='store_true')
7272
args = parser.parse_args()
7373

74-
if args.use_tls:
75-
collector_encryption = 'tls'
76-
else:
74+
if args.no_tls:
7775
collector_encryption = 'none'
76+
else:
77+
collector_encryption = 'tls'
7878

7979
return lightstep.Tracer(
8080
component_name=args.component_name,

0 commit comments

Comments
 (0)