The decrement operation should be moved after the last continue block if the over-long entry is truly skipped, otherwise this behavior should probably be documented/tested for.
|
if total_baggage_entries <= 0: |
|
return context |
|
total_baggage_entries -= 1 |
|
if len(entry) > self._MAX_PAIR_LENGTH: |
|
continue |
|
try: |
|
name, value = entry.split("=", 1) |
|
except Exception: # pylint: disable=broad-except |
|
continue |
The decrement operation should be moved after the last continue block if the over-long entry is truly skipped, otherwise this behavior should probably be documented/tested for.
opentelemetry-python/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py
Lines 57 to 65 in 4250078