Modo-me opened a new pull request, #3605:
URL: https://github.com/apache/dubbo-go/pull/3605

   ### Description
   Related to #3356 PR1
   Add metrics and logs for register, get, listen, and remove
   
   ### Changes
   
   - `metadata/report_instance.go`: Instrumented the four mapping methods on 
`DelegateMetadataReport` — `RegisterServiceAppMapping` (register), 
`GetServiceAppMapping` (switches to the listen event when listener is non-nil), 
`RemoveServiceAppMappingListener` (remove), emitting events with 
interface/group/application context, success status, and duration via the 
existing `metrics.Publish` pattern
   
   - `metrics/metadata/metric_set.go`: Added metric definitions for the four 
mapping operations — 4 event names (MetadataMappingRegister/Get/Listen/Remove), 
each with `_num_total` / `_num_succeed_total` / `_num_failed_total` / 
`_rt_milliseconds`, mapped to Prometheus names 
`dubbo_metadata_mapping_{register,get,listen,remove}_*`
   
   - `metrics/metadata/collector.go`: Added 4 event handlers (`StateCount` 
counters + `Rt` duration observations) and a `metadataMappingMetricLevel` tag 
layer exposing interface/group labels, with application overriding 
`application_name` on register, keeping label cardinality bounded
   
   - `metadata/mapping/metadata/service_name_mapping.go`: Added logs for 
mapping operations — Map/Get/Remove log success at Debug level and failures at 
Warn/Error with interface, group, application, report count, operation 
(get/listen), and error fields; Get now explicitly returns nil result on empty 
success
   
   - Added corresponding tests
   
   ### Checklist
   - [x] I confirm the target branch is `develop`
   - [x] Code has passed local testing
   - [x] I have added tests that prove my fix is effective or that my feature 
works
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to