Skip to content

Conversation

@federicobond
Copy link
Member

@federicobond federicobond commented Dec 6, 2025

This PR

Updates the OTel hook to support the latest version of semantic conventions published at:
https://opentelemetry.io/docs/specs/semconv/registry/attributes/feature-flag/

@federicobond federicobond requested review from a team as code owners December 6, 2025 14:21
@gemini-code-assist
Copy link

Summary of Changes

Hello @federicobond, 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 upgrades the OpenTelemetry hook to adhere to the most recent OpenTelemetry semantic conventions for feature flags. The primary goal is to enrich the tracing data generated during feature flag evaluations by incorporating more detailed attributes, thereby improving observability and troubleshooting capabilities. This involves adding a new dependency and refactoring the event attribute structure.

Highlights

  • Dependency Update: Added opentelemetry-semantic-conventions as a new dependency to align with the latest OpenTelemetry specifications.
  • Semantic Convention Alignment: Updated the OpenTelemetry hook to use the latest semantic conventions for feature flag evaluation, including new event names and attribute keys.
  • Enhanced Tracing Details: Expanded the data captured during flag evaluations to include more granular details such as result value, reason, variant, context ID, and comprehensive error information.
  • Test Coverage: Updated existing tests and added a new test case to validate the correct logging of detailed event attributes, especially for error scenarios.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

Copy link

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

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 updates the OpenTelemetry hook to align with the latest semantic conventions, which is a valuable improvement. The changes are well-implemented, and the tests have been updated accordingly to cover the new logic. I have a couple of suggestions to enhance dependency management and improve code clarity.

@federicobond federicobond force-pushed the latest-semconv branch 3 times, most recently from 49431a2 to 641b65d Compare December 7, 2025 00:15
@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.04%. Comparing base (97a5717) to head (01fae9c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #326      +/-   ##
==========================================
+ Coverage   94.56%   95.04%   +0.47%     
==========================================
  Files          22       22              
  Lines        1068     1090      +22     
==========================================
+ Hits         1010     1036      +26     
+ Misses         58       54       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@federicobond
Copy link
Member Author

Test failures are related to open-feature/python-sdk#552. We can work around that or require a version with that fix.

@federicobond federicobond force-pushed the latest-semconv branch 3 times, most recently from 7ba82b6 to 72ab648 Compare December 9, 2025 12:45
@federicobond
Copy link
Member Author

federicobond commented Dec 9, 2025

@gruebel there are some build failures related to protobuf in the openfeature-provider-flagd build. It looks like it might not be pulling in the latest version of protobuf.

I cannot reproduce it in my own machine though, despite running the same uv sync --frozen. Do you know anything about it?

Edit: fix is now in main

@federicobond federicobond force-pushed the latest-semconv branch 2 times, most recently from 258b4ee to 01fae9c Compare December 13, 2025 00:20
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.

2 participants