zhaohai666 opened a new pull request, #1387:
URL: https://github.com/apache/rocketmq-clients/pull/1387
## P8 feat(nodejs): add metrics export pipeline over OpenTelemetry / OTLP
gRPC
> ⚠ Stacked on the interceptor-hooks PR (P5) — the meter interceptor records
at hook
> points.
New `src/metrics/*`:
- `ClientMeterManager#reset(metric)` rebuilds an OTel `SdkMeterProvider` on
every
settings command; exports the four RocketMQ histograms
(`rocketmq_send_cost_time`,
`rocketmq_delivery_latency`, `rocketmq_await_time`,
`rocketmq_process_time`) with
explicit bucket boundaries, plus consumer cached-message/bytes gauges.
- Every export request is signed per request via the client's
`MQv2-HMAC-SHA1` metadata
provider.
- `MessageMeterInterceptor` records histograms at SEND / RECEIVE / CONSUME
hook points;
`PushConsumerGaugeObserver` aggregates cached messages/bytes per topic.
- `BaseClient` wires the manager (constructor / `onSettingsCommand` /
shutdown).
- `package.json`: adds
`@opentelemetry/{api,exporter-metrics-otlp-grpc,resources,sdk-metrics}`.
**Tests:** `nodejs/test/metrics.test.ts` (20 cases) + `hook.test.ts` (9) —
all pass
--
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]