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

Add enforcement of AttributeValues for trace events #347

Closed
toumorokoshi opened this issue Dec 20, 2019 · 5 comments
Closed

Add enforcement of AttributeValues for trace events #347

toumorokoshi opened this issue Dec 20, 2019 · 5 comments
Assignees
Labels

Comments

@toumorokoshi
Copy link
Member

Right now, AttributeValues in span tags are supposed to be one of (int, bool, float), but we do no enforcement of that value when added.

This then requires error handling to be put into the exporters themselves, which will become fairly redundant: https://github.com/open-telemetry/opentelemetry-python/pull/320/files/93331ff73905ab0dad11110bdac45737098c2d26#r360226796

It would be great if we could enforce the types of attributes when added instead.

@jakemalachowski
Copy link
Contributor

I'll take this one. Can this be assigned to me to avoid duplicating work?

@ocelotl
Copy link
Contributor

ocelotl commented Dec 27, 2019

Done! Thanks, @jakemalachowski 👍

@dgzlopes
Copy link
Contributor

With #348 merged I think that this issue can be closed!

@mauriciovasquezbernal
Copy link
Member

@dgzlopes not actually, #348 was about span attributes, this one is about attributes in Event:

def add_event(
self,
name: str,
attributes: types.Attributes = None,
timestamp: Optional[int] = None,
) -> None:
self.add_lazy_event(
trace_api.Event(
name,
Span.empty_attributes if attributes is None else attributes,
time_ns() if timestamp is None else timestamp,
)
)

@codeboten
Copy link
Contributor

Closed by #678

srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this issue Nov 1, 2020
* feat(plugin-http): handle client errors

closes open-telemetry#347

Signed-off-by: Olivier Albertini <[email protected]>

* fix: handling error in line with spec

Signed-off-by: Olivier Albertini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants