nanjiek opened a new pull request, #783:
URL: https://github.com/apache/dubbo-go-pixiu/pull/783
**What this PR does**:
This PR introduces a unified metric reporter filter
(`dgp.filter.http.metricreporter`) that consolidates the functionality of two
previous filters (`dgp.filter.http.metric` and
`dgp.filter.http.prometheusmetric`) while adding extensibility through
context-based metric collection.
Key features:
- **Unified Entry Point**: Single filter supporting both Pull
(OpenTelemetry) and Push (Prometheus Push Gateway) modes
- **OpenTelemetry Integration**: Pull mode uses OpenTelemetry SDK,
consistent with Pixiu Tracing
- **Context-based Extension**: Filters can record custom metrics via
`HttpContext.RecordMetric()`, enabling dynamic metric registration
**Which issue(s) this PR fixes**:
Fixes #573
**Special notes for your reviewer**:
1. **Context Extension**:
- Added `RecordMetric()`, `GetAllMetrics()`, and `ClearMetrics()` methods
to `HttpContext`
- Pull mode dynamically creates OpenTelemetry instruments for context
metrics
- Push mode currently logs context metrics (can be extended in future)
2. **Documentation**:
- Added comprehensive English and Chinese documentation in
`docs/sample/others/`
- Includes configuration examples, migration guide, and troubleshooting
--
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]