Conversation
62bf54d to
1fb2883
Compare
1fb2883 to
abc0340
Compare
ce64044 to
9d18bcb
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request upgrades OpenTelemetry dependencies to version 2.0 across the core and Google Cloud plugin packages. Key changes include the introduction of a MultiSpanProcessor to multiplex span processors, updates to exporters and resource detection to align with OTel 2.0 API changes (e.g., using instrumentationScope and parentSpanContext), and refined data point time handling for GCP metrics. Feedback focuses on improving the robustness of the MultiSpanProcessor through error handling and better typing, ensuring isolation when modifying shared HrTime objects in metric exporters, and avoiding side effects by cloning configuration objects.
98a2e4f to
e2ee1b7
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request upgrades OpenTelemetry dependencies to version 2.x and refactors the telemetry provider to support multiple span processors and metric readers. It also improves the reliability of the shutdown sequence and updates the Google Cloud plugin to accommodate OTel API changes. Review feedback suggests consistently using the default logger during shutdown to ensure logs are captured and to prevent potential recursion issues.
BREAKING CHANGE: upgrade to Otel 2.0+
Key Changes:
Core Telemetry Fixes (
js/core)enableTelemetryintracing.tsto correctly store and await the actual initialization promise. This prevents spans from being created before the SDK is fully ready.await flushTracing()tobeforeEachand relevant test cases inaction_test.tsandflow_test.ts. This ensures all asynchronously emitted spans are captured before assertions are made.MultiSpanProcessorinnode-telemetry-provider.tsto reliably handle multiple span processors across different OpenTelemetry versions.enableTelemetrylogic to properly shut down existing SDK instances before re-initializing, avoiding duplicate instrumentation and resource leaks.OpenTelemetry 2.0 Compatibility (
js/plugins/google-cloud)traces_test.tsto useparentSpanContext?.spanIdinstead of the deprecatedparentSpanIdproperty, which was removed in OTel 2.0.metrics_test.tsto use theInstrumentTypeenum for metric type comparisons.typeproperty from theMetricDescriptorinterface.Checklist (if applicable):
AIM
Dev UI