-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addition of internal consumer metrics (#52)
Adds three OTel metric instruments with instrumentation on: - records consumed - schema resets - memory in use. Note that I have not added tests, which would delay us a lot for little benefit. There are existing debug-level assertions that cover the memory accounting. To test this experimentally, I used a recorded data file and a configuration like: ``` receivers: file/input: path: "${env:DIR}/data.json.zstd" format: json compression: zstd throttle: 0 otelarrow/loopback: protocols: grpc: endpoint: 127.0.0.1:8082 max_recv_msg_size_mib: 24 exporters: otelarrow/forward: endpoint: 127.0.0.1:8082 wait_for_ready: true arrow: disabled: false num_streams: 1 disable_downgrade: true tls: insecure: true retry_on_failure: enabled: false sending_queue: enabled: false num_consumers: 1 timeout: 30s logging: file/output: path: "${env:DIR}/output.json.zstd" format: json compression: zstd extensions: pprof: processors: batch: send_batch_size: 1000 send_batch_max_size: 1100 timeout: 10s service: extensions: [pprof] pipelines: traces/first: receivers: [file/input] processors: [batch] exporters: [otelarrow/forward] traces/second: receivers: [otelarrow/loopback] processors: [] exporters: [logging, file/output] telemetry: resource: "service.name": "data-replayer" metrics: address: 127.0.0.1:8889 level: detailed logs: level: debug ``` Then I see metrics (via Prometheus) at :8889/metrics, like: ``` # HELP otelcol_arrow_batch_records_total # TYPE otelcol_arrow_batch_records_total counter otelcol_arrow_batch_records_total{stream_unique="4797068c"} 52445 # HELP otelcol_arrow_memory_inuse # TYPE otelcol_arrow_memory_inuse gauge otelcol_arrow_memory_inuse{stream_unique="4797068c",where="library"} 5.6499008e+07 otelcol_arrow_memory_inuse{stream_unique="4797068c",where="user"} 0 # HELP otelcol_arrow_schema_resets_total # TYPE otelcol_arrow_schema_resets_total counter otelcol_arrow_schema_resets_total{payload_type="RESOURCE_ATTRS",stream_unique="4797068c"} 1 otelcol_arrow_schema_resets_total{payload_type="SPANS",stream_unique="4797068c"} 7 otelcol_arrow_schema_resets_total{payload_type="SPAN_ATTRS",stream_unique="4797068c"} 4 otelcol_arrow_schema_resets_total{payload_type="SPAN_EVENTS",stream_unique="4797068c"} 3 otelcol_arrow_schema_resets_total{payload_type="SPAN_EVENT_ATTRS",stream_unique="4797068c"} 5 otelcol_arrow_schema_resets_total{payload_type="SPAN_LINKS",stream_unique="4797068c"} 3 otelcol_arrow_schema_resets_total{payload_type="SPAN_LINK_ATTRS",stream_unique="4797068c"} 1 ``` Note that memory inuse appears to rise slowly. --------- Co-authored-by: Laurent Quérel <[email protected]>
- Loading branch information
Showing
6 changed files
with
149 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters