Warning
Pure Generated Code, there be slooop
txpool.type_wrapper.instances: Count of each type wrapper found during parsing- Labels:
wrapper_type(e.g., "TxpoolContent", "Transaction", "Eip1559") - Shows the distribution of different transaction types and structures
- Labels:
txpool.input.bytes: Size of input data in bytestxpool.output.bytes: Size of output JSON in bytestxpool.parse.duration_ms: Total parse time in millisecondstxpool.content.parse_duration_ms: Time spent parsing txpool content specificallytxpool.field.replacements: Number of field name quotations performed
txpool.parse.errors: Count of parsing errors- Labels:
error_type,error_line,error_column
- Labels:
OTLP_ENDPOINT: The OTLP gRPC endpoint (default:http://localhost:4317)
- Start an OpenTelemetry Collector:
# otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
prometheus:
endpoint: "0.0.0.0:8889"
logging:
loglevel: debug
service:
pipelines:
metrics:
receivers: [otlp]
exporters: [prometheus, logging]
logs:
receivers: [otlp]
exporters: [logging]
traces:
receivers: [otlp]
exporters: [logging]- Run the collector:
otelcol --config otel-collector-config.yaml- Run the parser:
cast tx-pool content | ./target/release/rust-txpool- View metrics at
http://localhost:8889/metrics
21:14:52.217 metric rust_txpool count of txpool.type_wrapper.instances is 3
21:14:52.217 debug rust_txpool Found 3 instances of type wrapper: Transaction
21:14:52.218 metric rust_txpool count of txpool.field.replacements is 156
21:14:52.218 metric rust_txpool last of txpool.content.parse_duration_ms is 2
21:14:52.218 info rust_txpool Successfully parsed txpool content in 2ms
You can create a Grafana dashboard with these queries:
-
Type Wrapper Distribution:
sum by (wrapper_type) (txpool_type_wrapper_instances) -
Parse Performance:
rate(txpool_parse_duration_ms[5m]) -
Data Volume:
rate(txpool_input_bytes[5m]) rate(txpool_output_bytes[5m]) -
Error Rate:
rate(txpool_parse_errors[5m])