Skip to content

Error in urllib3 instrumentation example in instrumentation documentation #1767

@JM-ET

Description

@JM-ET

Describe your environment
https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/urllib3/urllib3.html
section: Request/Response hooks
Contains an error in example which causes pylint
no-value-for-parameter (self)

Steps to reproduce
Current example on this page:
URLLib3Instrumentor.instrument(
request_hook=request_hook, response_hook=response_hook)
)

What is the expected behaviour?
Works and runs successfully

What is the actual behaviour?
pylint - no-value-for-parameter (self)
And fails to run if disable lint check

Correction
Need to create an instance of URLLib3Instrumentor - missing () after class name

URLLib3Instrumentor().instrument(
request_hook=request_hook, response_hook=response_hook)
)

example under section: Usage is correct, just not this example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions