-
Notifications
You must be signed in to change notification settings - Fork 766
[WIP] Fix tornado server (request) duration metric calculation #3489
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
[WIP] Fix tornado server (request) duration metric calculation #3489
Conversation
|
… metric calculation (open-telemetry#3486)
91568a1
to
047bf3d
Compare
Question for review - with this change, do we think it needs a specific test, where we start 2 concurrent requests, staggered, then measure expected duration similar to opentelemetry-instrumentation-asgi test_asgi_middleware? |
…unked json in bedrock converse_stream (open-telemetry#3544) * opentelemetry-instrumentation-botocore: fix handling of tool input chunked json in converse_stream We need to accumulate all the tool input as string before decoding it otherwise we may end up with invalid json. * Add changelog * Remove leftover print * No need for too-many-statements disable
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…ntation (open-telemetry#3460) * respect supress_instrumentation * update CHANGELOG * fix link * update CHANGELOG --------- Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
…rumentation (open-telemetry#3477) * respect supress_instrumentation * update changelog * Update CHANGELOG.md Fix changelog after release --------- Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…iddleware (open-telemetry#3529) * opentelemetry-instrumentation-starlette: fix memory leak and double middleware * Changelog * Update CHANGELOG.md Co-authored-by: Joe McGinley <116890464+jomcgi@users.noreply.github.com> --------- Co-authored-by: Joe McGinley <116890464+jomcgi@users.noreply.github.com>
…etry#3257) * feat: support batch (getmany) in aiokafka instrumentation * test: fix unclosed resources and typing * test: add test_wrap_getmany * fix: get unique topic list in batch * fix: update typing, run pyupgrade * fix: remove json.dumps from SERVER_ADDRESS attribute * fix pylint * fix: sync span_kind with spec * add CHANGELOG entry * remove changes not from this issue * move types under TYPE_CHECKING * move CHANGELOG entry to unreleased * enable pyright for aiokafka, fix key type * Update CHANGELOG.md --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
…etry#3513) * Add support for metrics * Updated changelog * Update package.py * generate and lint * Update * Update --------- Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com> Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…emetry#3429) * Fixes container detector for systemd & cgroupv1 with Docker * Update CHANGELOG --------- Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…telemetry#3540) * refactor(grpc): replace SpanAttributes with semconv attributes * refactor(flask): replace SpanAttributes with semconv attributes (fix ruff linting) --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…detector-containerid` (open-telemetry#3536) * resource-dector-container: package rename Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> * fix ruff Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> * change entrypoint Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> * fix Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> * fix test Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> * fix for entrypoint name Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> * add changelog Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --------- Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
…emetry#3545) * Allow reraising the root exception if instrumentation fails I would rather completely fail startup in my services if instrumentation fails for whatever reason instead of just logging an exception and continuing. Use case: from opentelemetry import autoinstrumentation autoinstrumentation.initialize(swallow_exceptions=False) * Fix lint * Type hinting, re-raise original exception * One more type hint to indicate None return --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
… debug (open-telemetry#3579) * resource-detector-containerid: demote failure to read cgroup files to debug Make the detection more quiet so we can load it on application not running on linux machines without spamming logs. * Add changelog
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…n-telemetry#3582) * refactor: fix import paths * fix imports --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…lemetry#3382) Signed-off-by: Shwejan Raj, Bhupathi <Bhupathi.ShwejanRaj@fmr.com> Signed-off-by: Bhupathi Shwejan Raj <Bhupathi.ShwejanRaj@fmr.com>
…-telemetry#3601) * feat(pymongo): aggregate and getMore capture statements * chore: update changelog * fix: tests * fix: proper MockCommand and expectations * chore: ruff-format
* ref(mysql): remove SpanAttributes * fix imports
open-telemetry#3584) * pika: added instrumentation for pika.connection.Connection and pika.channel.Channel, thus added instrumentation support to all SelectConnection adapters. * updated changelog. --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…3498) * Add tornado WebSocketHandler instrumentation support. (open-telemetry#2761) * Linting * Update CHANGELOG.md * Apply refactor changes from open-telemetry#3582 --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…elemetry#3627) Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
* Fix system metrics unit tests on mac Don't test for system.network.connections on mac * round
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…while fixing dependency conflict breakage. (open-telemetry#3610)
* Added base files for the project * Added fix for generate and pre-commit * Added package.py * tox generate changes to auto-generated files * tox ruff reformatted file * removed python 3.8 from classifiers * addressed comments * addressed aabmass's comments
* Fix git pull error in core contrib test Core contrib is intermittently failing when pulling the core repo because tox does not retry on failure. Add gh actions/checkout for the core repo before running tox to mitigate this. * generate-workflows Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> * Update CHANGELOG.md --------- Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> Co-authored-by: emdneto <9735060+emdneto@users.noreply.github.com> Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
) fixes open-telemetry#3549 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> Co-authored-by: Aaron Abbott <aaronabbott@google.com>
* Initial structure * Update scripts/generate_instrumentation_bootstrap.py Co-authored-by: Pablo Collins <pablo.collins@gmail.com> * missing generated library * Version update to offset traceloop implementation * uv sync after rebase * Missing release entries --------- Co-authored-by: Pablo Collins <pablo.collins@gmail.com>
Apologies - my merge from main turned into a rebase and munged this PR up. I'll close this and open a new PR to keep things clean. Moved to #3679 |
Description
Fix the tornado instrumenter to track a request's elapsed time in an async-safe way so concurrent requests calculate their own elapsed time for the HTTP_SERVER_DURATION metric properly.
Fixes #3486
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I just used the existing automated tests to ensure no regressions occurred. I can explore further if we want to try to add concurrent request testing.
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.