Developer
Mahmudul Rapi
mrapi@meta.com
Performance
YoY:+567%Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
No bugs introduced or fixed in this period.
Latest analyzed commits from this developer.
| Hash | Message | Date | Files |
|---|
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.
| Effort |
|---|
| 0c441114 | This commit **enables client interceptors** for **Rust Thrift clients**, resolving a critical gap where tracing, context propagation, and privacy interceptors were not being invoked. It introduces the **Thrift flag** `enable_rust_client_interceptors` for controlled rollout, replacing `nullptr` with proper interceptor retrieval in `methods.h` across all RPC types. This **bug fix** ensures `processClientInterceptorsOnRequest` is called for all RPC patterns and `processClientInterceptorsOnResponse` for request/response RPCs, significantly enhancing observability and functionality for **Rust services**. The change is behind a feature flag, allowing for a safe and controlled deployment. | Mar 19 | 2 | grow |
| 2f0408de | This commit introduces an **opt-in capability** to automatically propagate `folly::RequestContext` across `tokio::spawn` boundaries, addressing a common issue where context was lost in spawned tasks. By leveraging Tokio's unstable task lifecycle hooks within the new `folly::rust::request_context::request_context_tokio` module, it eliminates the need for manual `.with_current_rctx()` wrapping. This **new feature** significantly improves the reliability of **Artillery tracing** and **context propagation** for Rust async code, ensuring consistent context across the **Tokio runtime**. Users can enable this by calling `install_request_context_hooks()` on their `tokio::runtime::Builder`, with new FFI bindings and performance benchmarks also included. | Mar 12 | 5 | grow |
| 73de7297 | This commit **removes an obsolete Thrift server handler** previously responsible for context propagation within the **`www` infrastructure**. The `contextprop server handler` has been **deprecated and unused for over a year**, having been superseded by a newer "JK" system for context propagation. This is a **cleanup and maintenance task** that **removes dead code**, streamlining the codebase and reducing potential confusion. There is **no functional impact** on the system, as the removed component was already inactive and non-operational. | Feb 18 | 4 | – |
| b6e4173b | This commit **improves metrics attribution** for rate limiting counters within the **Thrift Hack library**. It explicitly prefixes the `breadth_rate_limited` counter name with `hhvm.` in the `thrift/lib/hack/src/contextprop/TraceSizeEstimationContextHandler.php` file, specifically within the `bumpBreadthRateLimitedCounter` function. This **observability enhancement** ensures that rate limiting events originating from **HHVM** are correctly identified in monitoring systems, resolving ambiguity where the counter was previously attributed to an "empty service id" (implicitly WWW). The change helps in accurately diagnosing and understanding **HHVM's resource management** and **rate limiting behavior** for services like WWW. | Feb 4 | 1 | maint |
| cde59997 | This commit introduces a **new feature** to **extend trace breadth limiting** to outgoing **Memcache/ucache and TAO service calls** within the WWW environment. Previously, these calls, handled by low-level glue classes like `FBTraceGlueTaoExtension` and `FBTraceGlueMCX`, bypassed standard Thrift tracing and were not counted against existing breadth limits. The change integrates these calls into the `TraceSizeEstimationContextHandler` by adding checks for `shouldBlockTraceContinuationOnOutgoingRequest()` to suppress continuations and calling `bumpBreadth()` for accurate tracking. This ensures comprehensive **trace size estimation and enforcement**, preventing excessive trace propagation and improving system stability and observability for these critical, non-standard Thrift interactions. | Feb 2 | 1 | grow |
| b7c3593a | This commit **refactors** the `TraceSizeEstimationContextHandler` within the **Hack Thrift context propagation** module to align its behavior with the C++ implementation. The primary change involves introducing **breadth tracking** and updating the **depth calculation** logic, particularly within the `onOutgoingDownstream` method. This **maintenance** and **synchronization** effort ensures consistent **WWW outbound trace size estimation** across different language runtimes. New unit tests have been added to thoroughly validate the updated depth, breadth, and singleton behavior of the handler. | Jan 9 | 2 | maint |
| 75da3b72 | This commit performs a **refactoring** within the **ThriftContextPropState** module by renaming methods and properties from 'breadthDepthProduct' to 'breadth' for **improved clarity**. Specifically, methods like `getBreadth` and `setBreadth` in `thrift/lib/hack/src/ThriftContextPropState.php` are updated to simplify naming conventions for context property state management. Corresponding **test cases** in `thrift/lib/hack/src/__tests__/ThriftContextPropStateTest.php` are also adjusted to reflect these changes, ensuring the continued correctness of the **Thrift Hack library**. This is a **maintenance** task focused on enhancing code readability and maintainability. | Jan 7 | 2 | maint |
| 7b360e5a | This commit **fixes a critical issue** where **WWW (HHVM) services** failed to correctly propagate trace depth, leading to inaccurate `depth` values in distributed traces across C++ and HHVM service boundaries. It introduces a new **`TraceSizeEstimationContextHandler`** within the **Thrift context propagation** mechanism (`thrift/lib/hack/src/contextprop/`) to manage and increment trace depth. This **new capability** ensures that HHVM services now properly participate in trace depth propagation, providing more accurate distributed tracing data. The change is crucial for reliable trace limiting in C++ services that depend on the `depth` metric. | Nov 7 | 2 | grow |
| 261bab09 | This commit **introduces new API methods** within the **Thrift context propagation state** for Hack/HHVM services. It adds `getBreadthDepthProduct`, `setBreadthDepthProduct`, `getDepth`, and `setDepth` to `thrift/lib/hack/src/ThriftContextPropState.php`, along with corresponding unit tests. This **new capability** is a **preparatory feature** designed to enable future modifications that will correctly track and increment trace depth and breadth-depth product for **WWW services**. The ultimate goal is to resolve an issue where HHVM calls currently fail to properly increment trace depth, which is critical for accurate **trace limiting and monitoring** across service call chains. | Oct 31 | 2 | maint |
| 2b103079 | This commit performs a **cleanup of obsolete `psp` variables** that were previously utilized for user ID observability and debugging purposes. These variables are no longer logged to the `artillery` system, rendering them redundant. The change is a **maintenance task** that **removes dead code** from the system, improving code hygiene within the **observability infrastructure** without affecting any current functionality or logging behavior. | Oct 30 | 2 | – |
| f7eb2c71 | This commit provides a **bug fix** for a **compilation issue** within the **Thrift C++2 library's PluggableFunction mechanism**. It **adds the `inline` keyword** to function declarations inside the `THRIFT_PLUGGABLE_FUNC_SET` macro in `thrift/lib/cpp2/PluggableFunction.h`. This change enables **proper symbol deduplication** during linking, which is required by the C++ standard for allowing multiple identical function definitions. Consequently, it resolves a previously **failing test** and prevents compilation errors when pluggable functions are set multiple times. | Aug 27 | 1 | waste |
| caa8e2d4 | This commit **installs the `ContextProp Client Interceptor` within the `initThrift` function** to ensure consistent TFM (Thrift Frame Metadata) propagation across all Meta services, **enhancing core Thrift client-side functionality**. This change moves the interceptor installation to a more universally relevant initialization point, addressing previous linking blockers encountered with `initFacebookLight`. To prevent unit test failures arising from this broader installation, a **new `TestOnlyFunctionRegistry` and `THRIFT_PLUGGABLE_FUNC_SET_TEST` macro are introduced** in `thrift/lib/cpp2/PluggableFunction.h`. This **maintenance improvement** allows unit tests to set pluggable functions with precedence, ensuring test-specific implementations can override production ones without conflict. | Aug 27 | 6 | grow |
| 6da51cb8 | This commit **fixes a bug** in the **Thrift C++2 asynchronous library** where early RPC calls, especially during application startup, were not correctly utilizing the **Interceptor framework's metadata path**. It **reverts a previous change** in `thrift/lib/cpp2/async/InterceptorFrameworkMetadata.cpp` to disallow late overrides for `initializeInterceptorFrameworkMetadataStorage` and `serializeFrameworkMetadata`. This ensures that critical metadata propagation functions are registered early and consistently, forcing services like Scribe, FB303, and FalconProxy to properly use the interceptor framework for all Thrift calls. The change guarantees consistent metadata flow for all RPCs, improving the reliability and observability of early service interactions. | Jul 25 | 1 | waste |
| 7d85687e | This commit **enhances RPC metadata generation** within the **Thrift C++2 client transport** by introducing a `MethodMetadata` object to pass both method and server names, rather than just the method name. This **feature enhancement** and **refactoring** of `RocketClientChannel` and `RpcMetadataUtil` enables **improved Scuba logging** for the `ContextProp Client Interceptor` rollout. The new logging provides critical observability to track the transition to the interceptor framework, ensuring consistent `ThriftFrameworkMetadata` characteristics and validating the new code path's adoption. | Jul 18 | 5 | maint |
| 5bbd7949 | This commit introduces a **new capability** by adding a `logSampled` method to the **Thrift C++2 server's** `ApplicationEventHandler` class, defined in `thrift/lib/cpp2/server/LoggingEvent.h`. This enhancement enables **sampled logging for application-specific events** (`THRIFT_APPLICATION_EVENT`), allowing developers to control the volume of logs generated. By providing this method, the **Thrift logging infrastructure** now offers consistent sampled logging functionality across various event types, improving performance and manageability for high-volume event streams. | Jul 17 | 1 | grow |
| a7eeb775 | This commit introduces a **new capability** to the **Thrift library** for Hack, specifically within `ThriftContextPropState`, by adding `getOfflineJobLocalContext` and `setOfflineJobLocalContext` methods. These accessors enable the proper management and retrieval of the `OfflineJobLocalContext` state, which is crucial for handling context-specific data in offline jobs. This foundational change paves the way for future integrations, such as onboarding tasks for Gojira fields, ensuring that the offline job context can be correctly propagated and utilized. A new test case in `ThriftContextPropStateTest.php` verifies the functionality of these new methods. | May 13 | 2 | maint |
| 123433ae | This commit implements a **bug fix** in the **Thrift pluggable function mechanism** by allowing late overrides for `initializeInterceptorFrameworkMetadataStorage` and `serializeFrameworkMetadata` within `thrift/lib/cpp2/async/InterceptorFrameworkMetadata.cpp`. This change addresses `std::logic_error` exceptions that occurred in dynamic loading scenarios, particularly in Python/Cinder unit tests and `mode/dev` runs, where C++ libraries might be loaded after initial function invocation. By enabling this **late override capability**, the commit prevents crashes related to `override after invocation` errors, improving the stability of **Thrift client interceptors** in environments with deferred library loading. | Apr 30 | 1 | waste |
| ae28ca1c | This commit **adds instrumentation** to the `ThriftContextPropState` module, specifically modifying the `setFBUserId` and `setIGUserId` methods in `thrift/lib/hack/src/ThriftContextPropState.php`. The primary goal is to **track the source of user ID assignments**, differentiating whether `FBUserId` or `IGUserId` are set during **request processing** or within a **Pre-Service Processing (PSP)** context. This **new capability** provides crucial logging to investigate suspected user ID leakage, where IDs might be incorrectly propagated between requests. It enables more precise updates to **SDG logic** based on the ID's origin, improving debugging and data integrity. | Mar 10 | 1 | grow |
| 177c0ba0 | This commit introduces **ODS counters** within the **Thrift Context Propagation State (TCPS)** to monitor when Facebook and Instagram user IDs are already set during updates. Specifically, instrumentation is added to the `updateFBUserId` and `updateIGUserId` functions in `thrift/lib/hack/src/ThriftContextPropState.php`. This **observability enhancement** provides critical insights into user ID propagation, helping to identify and understand discrepancies between user ID settings in HHVM and those reported by Dyno, ultimately aiding in **debugging and data flow analysis**. | Mar 4 | 1 | grow |
| 85d7ded9 | This commit performs a **refactoring** within the **ThriftContextPropState** class, located in `thrift/lib/hack/src/ThriftContextPropState.php`. It modifies the `updateIGUserFromVC` method to delegate its core logic for setting the IG user ID to the existing `updateIGUserId` method. This change eliminates duplicated code, thereby improving the maintainability and reducing the internal complexity of the **ThriftContextPropState** component. The refactoring is an internal code improvement and does not alter the external behavior or API of the Thrift context propagation system. | Mar 3 | 1 | maint |
This commit **enables client interceptors** for **Rust Thrift clients**, resolving a critical gap where tracing, context propagation, and privacy interceptors were not being invoked. It introduces the **Thrift flag** `enable_rust_client_interceptors` for controlled rollout, replacing `nullptr` with proper interceptor retrieval in `methods.h` across all RPC types. This **bug fix** ensures `processClientInterceptorsOnRequest` is called for all RPC patterns and `processClientInterceptorsOnResponse` for request/response RPCs, significantly enhancing observability and functionality for **Rust services**. The change is behind a feature flag, allowing for a safe and controlled deployment.
This commit introduces an **opt-in capability** to automatically propagate `folly::RequestContext` across `tokio::spawn` boundaries, addressing a common issue where context was lost in spawned tasks. By leveraging Tokio's unstable task lifecycle hooks within the new `folly::rust::request_context::request_context_tokio` module, it eliminates the need for manual `.with_current_rctx()` wrapping. This **new feature** significantly improves the reliability of **Artillery tracing** and **context propagation** for Rust async code, ensuring consistent context across the **Tokio runtime**. Users can enable this by calling `install_request_context_hooks()` on their `tokio::runtime::Builder`, with new FFI bindings and performance benchmarks also included.
This commit **removes an obsolete Thrift server handler** previously responsible for context propagation within the **`www` infrastructure**. The `contextprop server handler` has been **deprecated and unused for over a year**, having been superseded by a newer "JK" system for context propagation. This is a **cleanup and maintenance task** that **removes dead code**, streamlining the codebase and reducing potential confusion. There is **no functional impact** on the system, as the removed component was already inactive and non-operational.
This commit **improves metrics attribution** for rate limiting counters within the **Thrift Hack library**. It explicitly prefixes the `breadth_rate_limited` counter name with `hhvm.` in the `thrift/lib/hack/src/contextprop/TraceSizeEstimationContextHandler.php` file, specifically within the `bumpBreadthRateLimitedCounter` function. This **observability enhancement** ensures that rate limiting events originating from **HHVM** are correctly identified in monitoring systems, resolving ambiguity where the counter was previously attributed to an "empty service id" (implicitly WWW). The change helps in accurately diagnosing and understanding **HHVM's resource management** and **rate limiting behavior** for services like WWW.
This commit introduces a **new feature** to **extend trace breadth limiting** to outgoing **Memcache/ucache and TAO service calls** within the WWW environment. Previously, these calls, handled by low-level glue classes like `FBTraceGlueTaoExtension` and `FBTraceGlueMCX`, bypassed standard Thrift tracing and were not counted against existing breadth limits. The change integrates these calls into the `TraceSizeEstimationContextHandler` by adding checks for `shouldBlockTraceContinuationOnOutgoingRequest()` to suppress continuations and calling `bumpBreadth()` for accurate tracking. This ensures comprehensive **trace size estimation and enforcement**, preventing excessive trace propagation and improving system stability and observability for these critical, non-standard Thrift interactions.
This commit **refactors** the `TraceSizeEstimationContextHandler` within the **Hack Thrift context propagation** module to align its behavior with the C++ implementation. The primary change involves introducing **breadth tracking** and updating the **depth calculation** logic, particularly within the `onOutgoingDownstream` method. This **maintenance** and **synchronization** effort ensures consistent **WWW outbound trace size estimation** across different language runtimes. New unit tests have been added to thoroughly validate the updated depth, breadth, and singleton behavior of the handler.
This commit performs a **refactoring** within the **ThriftContextPropState** module by renaming methods and properties from 'breadthDepthProduct' to 'breadth' for **improved clarity**. Specifically, methods like `getBreadth` and `setBreadth` in `thrift/lib/hack/src/ThriftContextPropState.php` are updated to simplify naming conventions for context property state management. Corresponding **test cases** in `thrift/lib/hack/src/__tests__/ThriftContextPropStateTest.php` are also adjusted to reflect these changes, ensuring the continued correctness of the **Thrift Hack library**. This is a **maintenance** task focused on enhancing code readability and maintainability.
This commit **fixes a critical issue** where **WWW (HHVM) services** failed to correctly propagate trace depth, leading to inaccurate `depth` values in distributed traces across C++ and HHVM service boundaries. It introduces a new **`TraceSizeEstimationContextHandler`** within the **Thrift context propagation** mechanism (`thrift/lib/hack/src/contextprop/`) to manage and increment trace depth. This **new capability** ensures that HHVM services now properly participate in trace depth propagation, providing more accurate distributed tracing data. The change is crucial for reliable trace limiting in C++ services that depend on the `depth` metric.
This commit **introduces new API methods** within the **Thrift context propagation state** for Hack/HHVM services. It adds `getBreadthDepthProduct`, `setBreadthDepthProduct`, `getDepth`, and `setDepth` to `thrift/lib/hack/src/ThriftContextPropState.php`, along with corresponding unit tests. This **new capability** is a **preparatory feature** designed to enable future modifications that will correctly track and increment trace depth and breadth-depth product for **WWW services**. The ultimate goal is to resolve an issue where HHVM calls currently fail to properly increment trace depth, which is critical for accurate **trace limiting and monitoring** across service call chains.
This commit performs a **cleanup of obsolete `psp` variables** that were previously utilized for user ID observability and debugging purposes. These variables are no longer logged to the `artillery` system, rendering them redundant. The change is a **maintenance task** that **removes dead code** from the system, improving code hygiene within the **observability infrastructure** without affecting any current functionality or logging behavior.
This commit provides a **bug fix** for a **compilation issue** within the **Thrift C++2 library's PluggableFunction mechanism**. It **adds the `inline` keyword** to function declarations inside the `THRIFT_PLUGGABLE_FUNC_SET` macro in `thrift/lib/cpp2/PluggableFunction.h`. This change enables **proper symbol deduplication** during linking, which is required by the C++ standard for allowing multiple identical function definitions. Consequently, it resolves a previously **failing test** and prevents compilation errors when pluggable functions are set multiple times.
This commit **installs the `ContextProp Client Interceptor` within the `initThrift` function** to ensure consistent TFM (Thrift Frame Metadata) propagation across all Meta services, **enhancing core Thrift client-side functionality**. This change moves the interceptor installation to a more universally relevant initialization point, addressing previous linking blockers encountered with `initFacebookLight`. To prevent unit test failures arising from this broader installation, a **new `TestOnlyFunctionRegistry` and `THRIFT_PLUGGABLE_FUNC_SET_TEST` macro are introduced** in `thrift/lib/cpp2/PluggableFunction.h`. This **maintenance improvement** allows unit tests to set pluggable functions with precedence, ensuring test-specific implementations can override production ones without conflict.
This commit **fixes a bug** in the **Thrift C++2 asynchronous library** where early RPC calls, especially during application startup, were not correctly utilizing the **Interceptor framework's metadata path**. It **reverts a previous change** in `thrift/lib/cpp2/async/InterceptorFrameworkMetadata.cpp` to disallow late overrides for `initializeInterceptorFrameworkMetadataStorage` and `serializeFrameworkMetadata`. This ensures that critical metadata propagation functions are registered early and consistently, forcing services like Scribe, FB303, and FalconProxy to properly use the interceptor framework for all Thrift calls. The change guarantees consistent metadata flow for all RPCs, improving the reliability and observability of early service interactions.
This commit **enhances RPC metadata generation** within the **Thrift C++2 client transport** by introducing a `MethodMetadata` object to pass both method and server names, rather than just the method name. This **feature enhancement** and **refactoring** of `RocketClientChannel` and `RpcMetadataUtil` enables **improved Scuba logging** for the `ContextProp Client Interceptor` rollout. The new logging provides critical observability to track the transition to the interceptor framework, ensuring consistent `ThriftFrameworkMetadata` characteristics and validating the new code path's adoption.
This commit introduces a **new capability** by adding a `logSampled` method to the **Thrift C++2 server's** `ApplicationEventHandler` class, defined in `thrift/lib/cpp2/server/LoggingEvent.h`. This enhancement enables **sampled logging for application-specific events** (`THRIFT_APPLICATION_EVENT`), allowing developers to control the volume of logs generated. By providing this method, the **Thrift logging infrastructure** now offers consistent sampled logging functionality across various event types, improving performance and manageability for high-volume event streams.
This commit introduces a **new capability** to the **Thrift library** for Hack, specifically within `ThriftContextPropState`, by adding `getOfflineJobLocalContext` and `setOfflineJobLocalContext` methods. These accessors enable the proper management and retrieval of the `OfflineJobLocalContext` state, which is crucial for handling context-specific data in offline jobs. This foundational change paves the way for future integrations, such as onboarding tasks for Gojira fields, ensuring that the offline job context can be correctly propagated and utilized. A new test case in `ThriftContextPropStateTest.php` verifies the functionality of these new methods.
This commit implements a **bug fix** in the **Thrift pluggable function mechanism** by allowing late overrides for `initializeInterceptorFrameworkMetadataStorage` and `serializeFrameworkMetadata` within `thrift/lib/cpp2/async/InterceptorFrameworkMetadata.cpp`. This change addresses `std::logic_error` exceptions that occurred in dynamic loading scenarios, particularly in Python/Cinder unit tests and `mode/dev` runs, where C++ libraries might be loaded after initial function invocation. By enabling this **late override capability**, the commit prevents crashes related to `override after invocation` errors, improving the stability of **Thrift client interceptors** in environments with deferred library loading.
This commit **adds instrumentation** to the `ThriftContextPropState` module, specifically modifying the `setFBUserId` and `setIGUserId` methods in `thrift/lib/hack/src/ThriftContextPropState.php`. The primary goal is to **track the source of user ID assignments**, differentiating whether `FBUserId` or `IGUserId` are set during **request processing** or within a **Pre-Service Processing (PSP)** context. This **new capability** provides crucial logging to investigate suspected user ID leakage, where IDs might be incorrectly propagated between requests. It enables more precise updates to **SDG logic** based on the ID's origin, improving debugging and data integrity.
This commit introduces **ODS counters** within the **Thrift Context Propagation State (TCPS)** to monitor when Facebook and Instagram user IDs are already set during updates. Specifically, instrumentation is added to the `updateFBUserId` and `updateIGUserId` functions in `thrift/lib/hack/src/ThriftContextPropState.php`. This **observability enhancement** provides critical insights into user ID propagation, helping to identify and understand discrepancies between user ID settings in HHVM and those reported by Dyno, ultimately aiding in **debugging and data flow analysis**.
This commit performs a **refactoring** within the **ThriftContextPropState** class, located in `thrift/lib/hack/src/ThriftContextPropState.php`. It modifies the `updateIGUserFromVC` method to delegate its core logic for setting the IG user ID to the existing `updateIGUserId` method. This change eliminates duplicated code, thereby improving the maintainability and reducing the internal complexity of the **ThriftContextPropState** component. The refactoring is an internal code improvement and does not alter the external behavior or API of the Thrift context propagation system.