-
Notifications
You must be signed in to change notification settings - Fork 642
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
click: ignore click based servers #3174
Conversation
...tion/opentelemetry-instrumentation-click/src/opentelemetry/instrumentation/click/__init__.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-click/tests/test_click.py
Outdated
Show resolved
Hide resolved
We don't want to create a root span for long running processes like servers otherwise all requests would have the same trace id which is unfortunate.
0c1fbde
to
770a6e3
Compare
...tion/opentelemetry-instrumentation-click/src/opentelemetry/instrumentation/click/__init__.py
Outdated
Show resolved
Hide resolved
...tion/opentelemetry-instrumentation-click/src/opentelemetry/instrumentation/click/__init__.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this can avoid big surprises
…lemetry/instrumentation/click/__init__.py Co-authored-by: Tammy Baylis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 😺
@click.command("uvicorn") | ||
def command_uvicorn(): | ||
pass | ||
|
||
runner = CliRunner() | ||
result = runner.invoke(command_uvicorn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could just call from uvicorn.main import main as uvicorn_command
and use it instead of mocking it. Flask is not being mocked.
Please do not ask me to create an issue. I'm good. 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at the code flask is recognized by checking a parameter type since the command name run
is pretty generic. uvicorn name is pretty unique..
Description
We don't want to create a root span for long running processes like development web servers otherwise all requests would have the same trace id which is unfortunate.
Fixes #3171
Fixes #3172
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.