42
42
# collector_host_name='localhost',
43
43
# collector_port=14268,
44
44
# collector_endpoint='/api/traces?format=jaeger.thrift',
45
+ # collector_protocol='http',
45
46
# username=xxxx, # optional
46
47
# password=xxxx, # optional
47
48
)
77
78
DEFAULT_AGENT_HOST_NAME = "localhost"
78
79
DEFAULT_AGENT_PORT = 6831
79
80
DEFAULT_COLLECTOR_ENDPOINT = "/api/traces?format=jaeger.thrift"
81
+ DEFAULT_COLLECTOR_PROTOCOL = "http"
80
82
81
83
UDP_PACKET_MAX_LENGTH = 65000
82
84
@@ -91,10 +93,11 @@ class JaegerSpanExporter(SpanExporter):
91
93
when query for spans.
92
94
agent_host_name: The host name of the Jaeger-Agent.
93
95
agent_port: The port of the Jaeger-Agent.
94
- collector_host_name: The host name of the Jaeger-Collector HTTP
96
+ collector_host_name: The host name of the Jaeger-Collector HTTP/HTTPS
95
97
Thrift.
96
- collector_port: The port of the Jaeger-Collector HTTP Thrift.
97
- collector_endpoint: The endpoint of the Jaeger-Collector HTTP Thrift.
98
+ collector_port: The port of the Jaeger-Collector HTTP/HTTPS Thrift.
99
+ collector_endpoint: The endpoint of the Jaeger-Collector HTTP/HTTPS Thrift.
100
+ collector_protocol: The transfer protocol for the Jaeger-Collector(HTTP or HTTPS).
98
101
username: The user name of the Basic Auth if authentication is
99
102
required.
100
103
password: The password of the Basic Auth if authentication is
@@ -109,6 +112,7 @@ def __init__(
109
112
collector_host_name = None ,
110
113
collector_port = None ,
111
114
collector_endpoint = DEFAULT_COLLECTOR_ENDPOINT ,
115
+ collector_protocol = DEFAULT_COLLECTOR_PROTOCOL ,
112
116
username = None ,
113
117
password = None ,
114
118
):
@@ -119,6 +123,7 @@ def __init__(
119
123
self .collector_host_name = collector_host_name
120
124
self .collector_port = collector_port
121
125
self .collector_endpoint = collector_endpoint
126
+ self .collector_protocol = collector_protocol
122
127
self .username = username
123
128
self .password = password
124
129
self ._collector = None
@@ -139,7 +144,8 @@ def collector(self):
139
144
if self .collector_host_name is None or self .collector_port is None :
140
145
return None
141
146
142
- thrift_url = "http://{}:{}{}" .format (
147
+ thrift_url = "{}://{}:{}{}" .format (
148
+ self .collector_protocol ,
143
149
self .collector_host_name ,
144
150
self .collector_port ,
145
151
self .collector_endpoint ,
0 commit comments