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

Sampling context improvements #3847

Merged

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Dec 4, 2024

  • make serialization of args, kwargs consistent
    When using _serialize_span_attribute, it's not guaranteed that the same kind of object will be serialized the same way. E.g. lists are sometimes serialized as lists (if they only contain one element type) but can also be serialized as strings. This makes for a really bad user interface. So just use str everywhere when dealing with serializing task queue args and kwargs.
  • unfurl args, kwargs
  • better wording in migration guide
  • better error handling
    Sometimes we were just silencing errors with try...except. In cases where this can legitimately be an SDK issue, use capture_internal_exceptions instead.
  • add missing type hints
  • add more span attributes
    GH research shows some folks use headers to make sampling decisions. Add headers to span attributes.

Closes #3746

Copy link

codecov bot commented Dec 4, 2024

❌ 305 Tests Failed:

Tests completed Failed Passed Skipped
19178 305 18873 4435
View the top 3 failed tests by shortest run time
tests.test_scope test_get_current_scope_tags
Stack Traces | 0.001s run time
tests/test_scope.py:341: in test_get_current_scope_tags
    assert scope1.client.__class__ == NonRecordingClient
E   AttributeError: client
tests.test_scope test_get_current_scope_tags
Stack Traces | 0.001s run time
tests/test_scope.py:341: in test_get_current_scope_tags
    assert scope1.client.__class__ == NonRecordingClient
E   AttributeError: 'PotelScope' object has no attribute 'client'
tests.test_scope test_get_current_scope_tags
Stack Traces | 0.001s run time
tests/test_scope.py:341: in test_get_current_scope_tags
    assert scope1.client.__class__ == NonRecordingClient
E   AttributeError: 'PotelScope' object has no attribute 'client'

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@sentrivana sentrivana marked this pull request as ready for review December 5, 2024 15:55
Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@sentrivana sentrivana merged commit bcadb61 into potel-base Dec 5, 2024
67 of 125 checks passed
@sentrivana sentrivana deleted the ivana/potel/unify-sampling-context-serialization branch December 5, 2024 16:36
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 this pull request may close these issues.

2 participants