Skip to content

feat: track DataTransform metrics#8639

Merged
twoeths merged 1 commit intounstablefrom
te/data_transform_metrics
Dec 1, 2025
Merged

feat: track DataTransform metrics#8639
twoeths merged 1 commit intounstablefrom
te/data_transform_metrics

Conversation

@twoeths
Copy link
Copy Markdown
Contributor

@twoeths twoeths commented Nov 28, 2025

Motivation

  • we usually have to uncompress more messages than needed so it's good to track it in DataTransform

Description

part of #8629
Screenshot 2025-11-28 at 17 02 42

@twoeths twoeths requested a review from a team as a code owner November 28, 2025 10:05
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @twoeths, 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 introduces new metrics to the DataTransform component, specifically for tracking inbound and outbound data transformation operations (compression and decompression) categorized by topic type. The primary goal is to gain better visibility into the efficiency of these processes, particularly to identify and address cases where excessive data might be uncompressed, thereby improving resource utilization and network performance.

Highlights

  • New Metrics for DataTransform: Introduces tracking for compress and uncompress operations within the DataTransform component.
  • Topic-Type Specific Tracking: Metrics are recorded specifically by topic type, allowing for granular analysis of data transformation efficiency.
  • Motivation for Efficiency: Aims to understand and potentially optimize scenarios where more messages are uncompressed than ultimately needed, as observed with DataColumnSidecars.
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
Copy Markdown
Contributor

@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 introduces metrics to track the usage of DataTransform for inbound (uncompress) and outbound (compress) messages. The changes are well-contained and correctly add counters for each transformation type.

I have a couple of suggestions:

  1. In gossipsub.ts, there's an opportunity to refactor the metrics initialization to avoid a type assertion, which would improve code clarity and type safety.
  2. In metrics.ts, I noticed a potential discrepancy between the PR description, which mentions tracking "times", and the implementation, which uses "counters". It would be good to clarify if this is intentional.

Overall, this is a valuable addition for monitoring gossip message processing.

@twoeths twoeths merged commit 0c3b3f1 into unstable Dec 1, 2025
22 of 26 checks passed
@twoeths twoeths deleted the te/data_transform_metrics branch December 1, 2025 02:14
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.02%. Comparing base (dcab624) to head (650e0ef).
⚠️ Report is 2 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #8639   +/-   ##
=========================================
  Coverage     52.01%   52.02%           
=========================================
  Files           848      848           
  Lines         65847    65840    -7     
  Branches       4811     4811           
=========================================
- Hits          34253    34252    -1     
+ Misses        31525    31519    -6     
  Partials         69       69           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wemeetagain
Copy link
Copy Markdown
Member

🎉 This PR is included in v1.38.0 🎉

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.

3 participants