-
Notifications
You must be signed in to change notification settings - Fork 3
Otel #3
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
Open
iPeluwa
wants to merge
15
commits into
master
Choose a base branch
from
otel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced centralized error handling with `TimeFusionError` enum in new `error.rs` module - Updated `main.rs` and `database.rs` to use custom `Result` type for consistent error propagation - Added `flush_pending_writes` to `Database` for ensuring data consistency during shutdown - Improved graceful shutdown in `main.rs` with database write monitoring and proper channel handling - Removed unused `AppInfo` struct and `shutdown_tx` from `AppState` to eliminate dead code warnings - Fixed move errors and unused variable warnings related to `shutdown_tx` and `shutdown_rx` - Updated `lib.rs` to export `error` module
…ype safety - Replaced anyhow::Result with custom TimeFusionError in columns() - Improved schema validation with runtime checks instead of asserts - Updated imports to include error module and removed unused serde_json::json
…n Config - Updated Config to use String instead of Option<String> for aws_access_key_id and aws_secret_access_key - Modified Config::from_env() to fail if AWS credentials are missing - Updated Database::new() to pass required credentials to register_project() - Simplified Database::new_for_test() to use required config credentials
- Updated insert_records_batch to deserialize RecordBatches into OtelLogsAndSpans - Added validation for each record using OtelLogsAndSpans::validate() - Ensured write operation only proceeds if all records are valid - Included serde_arrow::SchemaLike for deserialization support
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This PR wires up OpenTelemetry tracing and metrics across the entire service.
telemetry.rs
TracerProvider
traitEnsures
SdkTracerProvider::tracer(...)
compiles correctly.Resource
Includes your service name and project key.
tracing-subscriber
Routes all
tracing
spans into OTLP.database.rs
Adds
#[tracing::instrument]
spans to all public methods, capturing key parameters:new
new_for_test
create_session_context
setup_session_context
register_pg_settings_table
register_set_config_udf
start_pgwire_server
resolve_table
insert_records_batch
insert_records
register_project
Each span records important fields (e.g.,
project_id
, batch sizes,port
, etc.) without changing existing logic.Closes #
How to test
Checklist