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

Unable to pickle SpanContext #1375

Closed
rickychu opened this issue Nov 11, 2020 · 2 comments
Closed

Unable to pickle SpanContext #1375

rickychu opened this issue Nov 11, 2020 · 2 comments
Labels
bug Something isn't working good first issue Good first issue help wanted triaged

Comments

@rickychu
Copy link
Contributor

Describe your environment
Python version: 3.8 or higher

    "telemetry.sdk.language": "python",
    "telemetry.sdk.name": "opentelemetry",
    "telemetry.sdk.version": "0.15b0"

Steps to reproduce

    try:        
        with tracer.start_as_current_span("main") as parent:

            parent_context = parent.get_span_context()
            p = pickle.dumps(parent_context)

            pickle_context = pickle.loads(p)
            assert(parent_context == pickle_context)

    except Exception as e:
        print(e)

What is the expected behavior?
No error

What did you expect to see?
True

What is the actual behavior?
Exception:
new() missing 2 required positional arguments: 'span_id' and 'is_remote'

Additional context
I need a way to pass the context to a multiprocessing function. This error is stopping me from archiving this. No issue on 0.13b0.

@github-actions
Copy link

github-actions bot commented Apr 9, 2021

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

@lzchen lzchen added triaged and removed backlog labels May 3, 2021
@lzchen lzchen added good first issue Good first issue and removed good first issue Good first issue labels May 3, 2021
@srikanthccv
Copy link
Member

This can be closed, fixed in #1380.

@lzchen lzchen closed this as completed Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good first issue help wanted triaged
Projects
None yet
Development

No branches or pull requests

4 participants