Thanks to visit codestin.com
Credit goes to github.com

Skip to content

regression: typing error with start_as_current_span on Python<3.10 #3836

Closed
@PietroPasotti

Description

@PietroPasotti

I suspect #3633 broke type checkers' ability to inspect the signature of start_as_current_span.

Describe your environment
python 3.11
opentelemetry-exporter-otlp-proto-http==1.24.0
pyright==1.1.331

Steps to reproduce
run pyright on code using tracer.start_as_current_span(name) or tracer.start_as_current_span(name=name)

What is the expected behavior?
nothing :)

What is the actual behavior?
error: No parameter named "name" (reportGeneralTypeIssues)
or
error: Expected 0 positional arguments (reportGeneralTypeIssues)

Additional context
Probably introduced by #3633

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions