Skip to content

chore: migrate to dartastic_opentelemetry_api v1.0.0-alpha#232

Draft
kevmoo wants to merge 5 commits into
genkit-ai:mainfrom
kevmoo:dartastic_otel
Draft

chore: migrate to dartastic_opentelemetry_api v1.0.0-alpha#232
kevmoo wants to merge 5 commits into
genkit-ai:mainfrom
kevmoo:dartastic_otel

Conversation

@kevmoo

@kevmoo kevmoo commented Mar 21, 2026

Copy link
Copy Markdown
Collaborator
  • Replaced package:opentelemetry with package:dartastic_opentelemetry_api.
  • Updated genkit instrumentation to use zone-based context propagation.
  • Migrated CollectorHttpExporter and RealtimeSpanProcessor to new SDK interfaces.
  • Updated all OTel-related tests and test utilities.
  • Added dependency overrides to testapps to resolve version conflicts.
  • Verified with full test suite and analysis across the workspace.

- Replaced package:opentelemetry with package:dartastic_opentelemetry_api.
- Updated genkit instrumentation to use zone-based context propagation.
- Migrated CollectorHttpExporter and RealtimeSpanProcessor to new SDK interfaces.
- Updated all OTel-related tests and test utilities.
- Added dependency overrides to testapps to resolve version conflicts.
- Verified with full test suite and analysis across the workspace.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant migration of the Genkit project's OpenTelemetry implementation. It transitions from the older package:opentelemetry to the new package:dartastic_opentelemetry_api and its corresponding SDK. This upgrade enhances the observability framework by introducing a more modern, type-safe API, improving asynchronous context propagation through zone-based management, and updating custom exporters to leverage the new SDK interfaces. The changes ensure future compatibility and provide a robust foundation for telemetry features.

Highlights

  • Migration to dartastic_opentelemetry_api: Replaced package:opentelemetry with the new package:dartastic_opentelemetry_api and package:dartastic_opentelemetry across the workspace.
  • Zone-based Context Propagation: Refactored runInNewSpan to utilize Context.current.withSpan(span).run() for improved asynchronous context propagation.
  • Exporter and Processor Migration: Updated CollectorHttpExporter and RealtimeSpanProcessor to align with the new SDK interfaces and object models, including significant changes to OTLP JSON translation.
  • Test Suite Updates: Modified all OpenTelemetry-related tests and test utilities to be compatible with the new SDK's lifecycle management and object models.
  • Dependency Overrides: Introduced dependency_overrides in pubspec.yaml files for dartastic_opentelemetry_api: 1.0.0-alpha to resolve version conflicts in packages/genkit and testapps.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully migrates the OpenTelemetry implementation from package:opentelemetry to package:dartastic_opentelemetry_api. The changes are extensive, touching the core instrumentation, exporters, and all related tests. The code is now aligned with the new async, zone-based context propagation model, and the changes generally improve code clarity. I've found one minor issue regarding a hardcoded service version in the telemetry configuration that should be updated to reflect the correct package version.

Comment thread packages/genkit/lib/src/o11y/telemetry/exporter_impl.dart Outdated
kevmoo added 4 commits March 20, 2026 20:42
This fixes CI failures in the format and Flutter test jobs caused by
dependency resolution conflicts between dartastic_opentelemetry and
dartastic_opentelemetry_api v1.0.0-alpha.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant