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

Attributes on events and links are not limited #1845

Closed
mariojonke opened this issue May 12, 2021 · 4 comments
Closed

Attributes on events and links are not limited #1845

mariojonke opened this issue May 12, 2021 · 4 comments
Labels

Comments

@mariojonke
Copy link
Contributor

Spec says that there MAY be limits for attributes on events and links.

Currently there is no restriction to the number of attributes that can be added to an Event or Link.
Check the following tests (when added to optentelemetry-sdk/tests/trace/test_trace.py) for verifying the current behavior:

    def test_link_attributes(self):
        link = trace.trace_api.Link(
            trace.trace_api.SpanContext(0x1, 0x2, is_remote=False),
            attributes={str(idx): idx for idx in range(0, 2000)}
        )
        tracer = new_tracer()
        with tracer.start_as_current_span("span", links=(link, )) as span:
            self.assertNotEqual(2000, len(span._links[0]._attributes))

    def test_event_attributes(self):
        attributes = {str(idx): idx for idx in range(0, 2000)}
        tracer = new_tracer()
        with tracer.start_as_current_span("span") as span:
            span.add_event("event", attributes=attributes)

        self.assertNotEqual(2000, len(span._events[0]._attributes))
@lzchen lzchen added bug Something isn't working good first issue Good first issue help wanted and removed bug Something isn't working labels May 14, 2021
@owais owais self-assigned this May 14, 2021
@owais
Copy link
Contributor

owais commented May 26, 2021

I was working on #1847 but that is solving a different problem. Removing myself from this issue for now in case anyone else wants to take it. Will probably come back to this in a couple of weeks.

@owais owais removed their assignment May 26, 2021
@github-actions
Copy link

This issue was marked stale due to lack of activity. It will be closed in 30 days.

@srikanthccv
Copy link
Member

I believe this is fixed in #1915 and can be closed?

@github-actions github-actions bot removed the backlog label Jun 27, 2021
@mariojonke
Copy link
Contributor Author

Fixed with #1915

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

4 participants