You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
null values SHOULD NOT be allowed in arrays. However, if it is impossible to
make sure that no null values are accepted
(e.g. in languages that do not have appropriate compile-time type checking), null values within arrays MUST be preserved as-is (i.e., passed on to span
processors / exporters as null).
@Oberon00 suggests that mypy users could use more information by changing the line pointed in the link. I would suggests getting somewhat familiar with what mypy is and does, @eddyleelin if you are not yet 👍
See the spec at https://github.com/open-telemetry/opentelemetry-specification/blob/v1.1.0/specification/common/common.md#attributes
While Python cannot actually prevent None values, we at least can make sure that those who use mypy are made aware that they are adding an invalid value to an array by changing the
Sequence[Optional[primitive]]
toSequence[primitive]
in https://github.com/open-telemetry/opentelemetry-python/blob/v1.0.0/opentelemetry-api/src/opentelemetry/util/types.py#L23-L26Actual code that is in place to accept None should continue to work as before.
The text was updated successfully, but these errors were encountered: