goutamadwant opened a new pull request, #860:
URL: https://github.com/apache/flink-agents/pull/860

   <!--
   * Thank you very much for contributing to Flink Agents.
   * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
   -->
   
   <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. 
-->
   Linked issue: #857
   
   ### Purpose of change
   
   This propagates metric group binding through cross-language resource 
wrappers.
   
   Java wrappers around Python resources now forward `setMetricGroup(...)` to 
the underlying Python resource through `PythonResourceAdapter`.
   
   Python wrappers around Java resources now forward `set_metric_group(...)` to 
the underlying Java resource, unwrapping the Python `FlinkMetricGroup` to its 
Java metric group.
   
   This keeps provider-owned metrics such as latency, request counts, error 
counts, cache metrics, backend dimensions, and nested resource metrics under 
the correct action metric scope for cross-language resources.
   
   ### Tests
   
   - `mvn --batch-mode --no-transfer-progress -pl api 
-Dtest=PythonChatModelSetupTest test`
   - `mvn --batch-mode --no-transfer-progress -pl runtime -am 
-Dtest=PythonResourceAdapterImplTest -Dsurefire.failIfNoSpecifiedTests=false 
test`
   - `mvn --batch-mode --no-transfer-progress -pl api,plan,runtime 
spotless:check`
   - `cd python && uv run --python 3.12 --extra test python -m pytest 
flink_agents/runtime/tests/test_cross_language_metric_group.py`
   - `cd python && uv run --python 3.12 --extra lint ruff check 
flink_agents/runtime/java/java_chat_model.py 
flink_agents/runtime/java/java_embedding_model.py 
flink_agents/runtime/java/java_vector_store.py 
flink_agents/runtime/java/java_resource_wrapper.py 
flink_agents/runtime/python_java_utils.py 
flink_agents/runtime/tests/test_cross_language_metric_group.py`
   
   ### API
   
   This touches public API interfaces by adding default metric-group forwarding 
hooks to `PythonResourceAdapter` and `PythonResourceWrapper`.
   
   The change is backward compatible because the new interface methods have 
default implementations.
   
   ### Documentation
   
   <!-- Do not remove this section. Check the proper box only. -->
   
   - [ ] `doc-needed` <!-- Your PR changes impact docs -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-included` <!-- Your PR already contains the necessary 
documentation updates -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to