Skip to content

Commit fb3e16d

Browse files
committed
Remove padding and add propagator to CI
1 parent 7931619 commit fb3e16d

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

Diff for: .github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
2424
matrix:
2525
python-version: [ py35, py36, py37, py38, pypy3 ]
26-
package: ["instrumentation", "exporter", "sdkextension"]
26+
package: ["instrumentation", "exporter", "sdkextension", "propagator"]
2727
os: [ ubuntu-latest ]
2828
include:
2929
# py35-instrumentation segfaults on 18.04 so we instead run on 20.04

Diff for: propagator/opentelemetry-propagator-opentracing/src/opentelemetry/propagator/opentracing/__init__.py

-7
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ def extract(
7373
and spanid != INVALID_SPAN_ID
7474
and _valid_spanid.match(spanid) is not None
7575
):
76-
# FIXME this padding is lost when trace_id is casted to int when a
77-
# SpanContext is created. This causes a test case to fail. The
78-
# approach coded here attempts to closely follow JS implementation:
79-
# https://github.com/open-telemetry/opentelemetry-js-contrib/pull/318/files?file-filters%5B%5D=.js&file-filters%5B%5D=.json&file-filters%5B%5D=.ts&file-filters%5B%5D=dotfile#diff-824ceb4ccf0b4daec4207237a16f2ff4833d941e2a931bd45788f9620b4e8837R91
80-
if len(traceid) == 16:
81-
traceid = "".join(["0" * 16, traceid])
82-
8376
context = set_span_in_context(
8477
DefaultSpan(
8578
SpanContext(

Diff for: propagator/opentelemetry-propagator-opentracing/tests/test_opentracing_propagator.py

-21
Original file line numberDiff line numberDiff line change
@@ -270,27 +270,6 @@ def test_extract_trace_id_span_id_sampled_false(self):
270270
self.assertTrue(span_context.is_remote)
271271
self.assertEqual(span_context.trace_flags, TraceFlags.DEFAULT)
272272

273-
def test_extract_padding_trace_id(self):
274-
"""Test padding of trace_id"""
275-
276-
span_context = get_current_span(
277-
self.opentracing_propagator.extract(
278-
carrier_getter,
279-
{
280-
OT_TRACE_ID_HEADER: "64fe8b2a57d3eff7",
281-
OT_SPAN_ID_HEADER: "e457b5a2e4d86bd1",
282-
OT_SAMPLED_HEADER: "false",
283-
},
284-
)
285-
).get_span_context()
286-
287-
self.assertEqual(
288-
hex(span_context.trace_id)[2:], "000000000000000064fe8b2a57d3eff7"
289-
)
290-
self.assertEqual(hex(span_context.span_id)[2:], "e457b5a2e4d86bd1")
291-
self.assertTrue(span_context.is_remote)
292-
self.assertEqual(span_context.trace_flags, TraceFlags.DEFAULT)
293-
294273
def test_extract_malformed_trace_id(self):
295274
"""Test extraction with malformed trace_id"""
296275

0 commit comments

Comments
 (0)