-
Notifications
You must be signed in to change notification settings - Fork 284
feat: user project telemetry #1961
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
058003a to
34ef4b5
Compare
jonaro00
left a comment
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 for the typo fixes :)
Remember to keep changes to legacy code few.
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.
PR Summary
This PR introduces OpenTelemetry support to the Shuttle runtime with a focus on telemetry data export. Here are the key points to consider:
- Added new
trace.rswith hardcoded configuration values for metrics interval and trace sampling rate that should be made configurable - Potential performance concerns with string allocations and cloning in hot paths in the LogCourier implementation
- Several unwrap() calls in trace.rs that could fail in production and should be handled more gracefully
The changes look solid overall but would benefit from making the configuration more flexible and improving error handling robustness.
8 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
This PR continues the implementation of user project telemetry in Shuttle. Here are the key changes in this update:
- Removes
ProjectTelemetryConfigvariant fromResourceTypeBetaenum incommon/src/resource.rs, indicating a shift from resource-based to feature flag-based telemetry configuration - Simplifies database interactions by removing SQLx trait implementations for telemetry configuration
- Moves telemetry setup behind the new
setup-telemetryfeature flag for better control and flexibility
The changes align with best practices by:
- Keeping modifications to legacy code minimal
- Using feature flags for controlled rollout
- Simplifying the data model by removing database dependencies
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
Based on the provided context, I'll summarize the latest changes in this PR:
Added string conversion and display functionality to ResourceTypeBeta enum to support OpenTelemetry integration, with minimal changes to legacy code.
- Added
AsRefStr,EnumString, andDisplayderive macros toResourceTypeBetaenum incommon/src/resource.rsfor improved string handling - Reordered existing derive macros for better code organization and readability
- Maintained existing test coverage to ensure functionality remains intact
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
Based on the latest changes and previous reviews, here's my analysis of the recent updates:
The PR adds OpenTelemetry integration to the Shuttle runtime's tracing system. Here are the key new points to consider:
- Added project name and version parameters to runtime start function in
shuttle_main.rsfor telemetry context enrichment - Introduced new
setup-telemetryfeature flag inruntime/Cargo.tomlthat's separate from existingsetup-tracingfeature - Implemented graceful shutdown handling in
ProviderGuardto ensure proper cleanup of telemetry resources
The changes maintain good separation of concerns while adding telemetry capabilities through feature flags, though some configuration values remain hardcoded.
8 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
Based on the latest changes and previous reviews, here's my analysis of the recent updates:
Adds OpenTelemetry integration to the Shuttle runtime's tracing system with improved error handling and resource cleanup.
- Improved error handling in
ProviderGuard::drop()with proper error logging for tracer, meter and logger shutdown failures - Added
SpanFieldVisitortrait and implementations for efficient field value handling inLogCourier - Introduced
EventFieldValuesstruct with field remapping support for standardized log attribute names
The changes show good attention to error handling and performance optimization while maintaining clean code organization.
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
Based on the recent changes and previous reviews, here's my analysis of the latest updates:
The PR continues to refine OpenTelemetry integration in the Shuttle runtime with dependency cleanup and feature flag improvements.
- Removed redundant
reqwest-rustlsfeature fromopentelemetry-otlpinruntime/Cargo.tomlsince rustls support is included by default - Removed unused dependencies
tokio-utilanduuidfromruntime/Cargo.tomlfor better maintenance - Introduced potential version mismatch between
tracing-opentelemetryv0.28.0 and other OpenTelemetry crates at v0.27 that should be addressed
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
Based on the latest changes and previous reviews, I'll provide a concise summary of the most recent updates:
Optimized string handling in resource type conversions with minimal impact to existing functionality.
- Changed
to_string()toas_ref()incommon/src/resource.rsfor more efficient string conversion ofResourceTypeBeta - Maintains existing functionality while reducing unnecessary string allocations
- Aligns with previous feedback to keep legacy code changes minimal
The change is focused and efficient, improving performance without disrupting the existing resource handling system.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
Based on the recent changes and previous reviews, here's my analysis of the latest updates to the OpenTelemetry integration:
- Added new
setup-telemetryfeature inruntime/Cargo.tomlthat's independent of existingsetup-tracingfeature, providing better control over telemetry capabilities - Changed default
RUST_LOGconfiguration frominfotoinfo,{crate_name}=debugfor more detailed logging - Version mismatch between
tracing-opentelemetryv0.28.0 and other OpenTelemetry crates at v0.27 needs to be resolved
The changes maintain good separation of concerns while enhancing observability, though version compatibility should be addressed.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
jonaro00
left a comment
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.
Looks good so far!
oddgrd
left a comment
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.
Nice!
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.
PR Summary
(updates since last review)
Based on the recent changes and previous reviews, here's a focused summary of the latest updates:
The PR adds OpenTelemetry support to shuttle-runtime with a new feature flag and dependency updates in Cargo.toml.
- Added new
setup-telemetryfeature flag that's independent fromsetup-tracingfor better control over telemetry capabilities - Pinned opentelemetry_sdk to version 0.27.1 but has version mismatch with tracing-opentelemetry at v0.28.0 that needs resolution
- Removed unused dependencies
tokio-utilanduuidfor better maintenance
The changes show good progress on telemetry integration but require version alignment between OpenTelemetry dependencies.
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
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.
PR Summary
(updates since last review)
Based on the recent changes and previous reviews, here's a focused summary of the latest updates:
Improved error handling and field value processing in OpenTelemetry integration for shuttle-runtime.
- Added robust error handling in
ProviderGuard::drop()with proper logging for shutdown failures - Implemented
SpanFieldVisitortrait with efficient field value handling for better performance - Standardized log attribute names through
EventFieldValuesfield remapping system
The changes demonstrate good attention to error handling and performance while maintaining clean code organization.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
0239e57 to
656c9dd
Compare
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.
PR Summary
(updates since last review)
Based on the recent changes and previous reviews, here's a focused summary of the latest updates:
- Added
SpanFieldVisitortrait and implementations intrace.rsfor efficient field value handling in OpenTelemetry integration - Improved error handling in
ProviderGuard::drop()with proper logging for telemetry component shutdowns - Introduced field remapping in
EventFieldValuesto standardize log attribute names across the system
The changes demonstrate good attention to performance optimization and error handling while maintaining clean code organization.
Note: I've kept this summary brief and focused only on the most recent changes not mentioned in previous reviews, as requested.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
Description of change
PR expands on the existing
tracingsetup/configuration feature inshuttle-runtime, adding an enhanced subscriber that includes an OpenTelemetry layer and enables exporting all telemetry data (traces, metrics, and logs) generated by a Shuttle project to any compatible OTLP collector.The new behavior is gated behind a new
setup-telemetryfeature flag.Important
PR changes the default
RUST_LOGconfiguration frominfotoinfo,{crate_name}=debug