File tree Expand file tree Collapse file tree 2 files changed +3
-23
lines changed
exporter/opentelemetry-exporter-otlp
src/opentelemetry/exporter/otlp Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -132,27 +132,20 @@ def __init__(
132
132
endpoint : str = "localhost:55680" ,
133
133
credentials : ChannelCredentials = None ,
134
134
metadata : Optional [Tuple [Any ]] = None ,
135
- compression : str = None ,
135
+ compression : Compression = Compression . NoCompression ,
136
136
):
137
137
super ().__init__ ()
138
138
139
139
self ._metadata = metadata
140
140
self ._collector_span_kwargs = None
141
141
142
- if compression == "gzip" :
143
- self .compression = Compression .Gzip
144
- else :
145
- self .compression = Compression .NoCompression
146
-
147
142
if credentials is None :
148
143
self ._client = self ._stub (
149
- insecure_channel (endpoint , compression = self . compression )
144
+ insecure_channel (endpoint , compression = compression )
150
145
)
151
146
else :
152
147
self ._client = self ._stub (
153
- secure_channel (
154
- endpoint , credentials , compression = self .compression
155
- )
148
+ secure_channel (endpoint , credentials , compression = compression )
156
149
)
157
150
158
151
@abstractmethod
Original file line number Diff line number Diff line change @@ -158,19 +158,6 @@ def setUp(self):
158
158
def tearDown (self ):
159
159
self .server .stop (None )
160
160
161
- def test_no_compression (self ):
162
- """Test default compression passed to constructor"""
163
- exporter = OTLPSpanExporter ()
164
-
165
- self .assertEqual (exporter .compression , Compression .NoCompression )
166
-
167
- def test_gzip_compression (self ):
168
- """Test the compression argument passed to constructor."""
169
- compression = "gzip"
170
- exporter = OTLPSpanExporter (compression = compression )
171
-
172
- self .assertEqual (exporter .compression , Compression .Gzip )
173
-
174
161
@patch ("opentelemetry.exporter.otlp.exporter.expo" )
175
162
@patch ("opentelemetry.exporter.otlp.exporter.sleep" )
176
163
def test_unavailable (self , mock_sleep , mock_expo ):
You can’t perform that action at this time.
0 commit comments