Skip to content

Piece level monitoring w3infraย #391

@vasco-santos

Description

@vasco-santos

We currently monitor at aggregate level whether aggregates are being offered and accepted by MPs https://github.com/w3s-project/w3filecoin-infra/blob/main/packages/functions/src/monitor/handle-deal-monitor-alert-cron-tick.js (in stack https://github.com/w3s-project/w3filecoin-infra/blob/main/stacks/api-stack.js#L188).

It should be easy to port similar behaviour for w3infra to track piece level monitoring with same thresholds. Instead of relying on https://github.com/w3s-project/w3filecoin-infra/blob/main/packages/functions/src/monitor/handle-deal-monitor-alert-cron-tick.js#L31 it would rely on the PieceStore like we do for the other CRON tick in w3infra: https://github.com/w3s-project/w3infra/blob/main/filecoin/functions/handle-cron-tick.js. This queries the PieceStore for the oldest Pieces pending a deal, and if they were inserted older than the threshold, they would have the alert.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions