Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadableSpan 'links' and 'events' properties cause TypeError #2214

Closed
Arnatious opened this issue Oct 16, 2021 · 2 comments · Fixed by #2215
Closed

ReadableSpan 'links' and 'events' properties cause TypeError #2214

Arnatious opened this issue Oct 16, 2021 · 2 comments · Fixed by #2215

Comments

@Arnatious
Copy link
Contributor

@property
def events(self) -> Sequence[Event]:
return MappingProxyType(self._events)
@property
def links(self) -> Sequence[trace_api.Link]:
return MappingProxyType(self._links)

Attempts to pass self._links: Sequence[trace_api.Link] or self._events: Sequence[Event] as argument to MappingProxyType().

Result:

TypeError: mappingproxy() argument must be a mapping, not list
@srikanthccv
Copy link
Member

Surprised how this is working then, TIL: BoundedList implementation doesn't throw the type error.

@Arnatious
Copy link
Contributor Author

Only caught it because I'm working on parsing json to ReadableSpans. Seems that wasn't extracted cleanly from the Span implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants