-
-
Notifications
You must be signed in to change notification settings - Fork 0
Instrument api with opentelemetry #23
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
Conversation
WalkthroughThe recent updates introduce OpenTelemetry tracing for various functions across the application, enhancing observability. The Dockerfile's Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Didn't try it out but seen it in action outside of GH, seems simple so don't have any worries, seems good, good start for opentelemetry on our API
@coderabbitai review |
Actions performedReview triggered.
|
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
Dockerfile (1)
Line range hint
9-9
: Pin versions inapt-get install
to avoid potential inconsistencies during builds.- apt-get install -y --no-install-recommends git + apt-get install -y --no-install-recommends git=<specific_version>
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- Dockerfile (1 hunks)
- lib/init.py (1 hunks)
- lib/api.py (1 hunks)
- lib/routes/environment.py (8 hunks)
- lib/routes/flight.py (10 hunks)
- lib/routes/motor.py (8 hunks)
- lib/routes/rocket.py (8 hunks)
- lib/settings/gunicorn.py (1 hunks)
- pyproject.toml (1 hunks)
- requirements.txt (1 hunks)
Files skipped from review due to trivial changes (4)
- lib/init.py
- lib/api.py
- pyproject.toml
- requirements.txt
Additional context used
Hadolint
Dockerfile
[warning] 9-9: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
Additional comments not posted (18)
lib/settings/gunicorn.py (1)
6-17
: Ensure that thepost_fork
function is correctly setting up OpenTelemetry with Uptrace. The configuration appears correct and follows best practices for tracing setup.Dockerfile (1)
19-19
: The updatedCMD
instruction correctly specifies thegunicorn
configuration and other parameters. Ensure that the specified settings meet the application's performance and concurrency requirements.lib/routes/environment.py (1)
6-6
: OpenTelemetry tracing has been correctly integrated into the environment routes. The tracer is properly initialized and used in the respective functions.Also applies to: 28-28
lib/routes/motor.py (1)
6-6
: OpenTelemetry tracing has been correctly integrated into the motor routes. The tracer is properly initialized and used in the respective functions.Also applies to: 28-28
lib/routes/rocket.py (6)
42-45
: The OpenTelemetry tracing integration increate_rocket
is correctly implemented.
56-57
: The OpenTelemetry tracing integration inread_rocket
is correctly implemented.
76-79
: The OpenTelemetry tracing integration inupdate_rocket
is correctly implemented.
90-91
: The OpenTelemetry tracing integration indelete_rocket
is correctly implemented.
102-105
: The OpenTelemetry tracing integration inread_rocketpy_rocket
is correctly implemented.
116-117
: The OpenTelemetry tracing integration insimulate_rocket
is correctly implemented.lib/routes/flight.py (8)
44-47
: The OpenTelemetry tracing integration increate_flight
is correctly implemented.
58-59
: The OpenTelemetry tracing integration inread_flight
is correctly implemented.
70-73
: The OpenTelemetry tracing integration inread_rocketpy_flight
is correctly implemented.
87-90
: The OpenTelemetry tracing integration inupdate_flight_env
is correctly implemented.
109-115
: The OpenTelemetry tracing integration inupdate_flight_rocket
is correctly implemented.
134-137
: The OpenTelemetry tracing integration inupdate_flight
is correctly implemented.
148-149
: The OpenTelemetry tracing integration indelete_flight
is correctly implemented.
160-161
: The OpenTelemetry tracing integration insimulate_flight
is correctly implemented.
This PR intends to instrument infinity-API with opentelemetry hosting spans on Uptrace.
In terms of cost, Uptrace provides 50GB or 2500 time-series each month for free, which probably will suit our needs for years.
Summary by CodeRabbit
New Features
Updates
Dependencies
uptrace
,opentelemetry.instrumentation.fastapi
,opentelemetry-api
, andopentelemetry-sdk
.Bug Fixes