-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: filecoin metrics for ucan stream prometheus and updates metrics endpoint #290
Conversation
View stack outputs
|
c954475
to
8e039cd
Compare
8e039cd
to
b19c1ef
Compare
b19c1ef
to
9e9c3b0
Compare
9e9c3b0
to
3da3463
Compare
@@ -48,16 +62,17 @@ export type UcanInvocationType = 'workflow' | 'receipt' | |||
|
|||
export interface UcanInvocation { | |||
carCid: string | |||
invocationCid: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but, only for receipts.
I ended up re-typing these definitions in billing
to more accurately reflect what's there and not get errors for properties that don't always exist:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @alanshaw thanks!
I will add this as follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -48,16 +62,17 @@ export type UcanInvocationType = 'workflow' | 'receipt' | |||
|
|||
export interface UcanInvocation { | |||
carCid: string | |||
invocationCid: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but, only for receipts.
I ended up re-typing these definitions in billing
to more accurately reflect what's there and not get errors for properties that don't always exist:
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Adds filecoin metrics for ucan stream in the same pattern we track other metrics in https://up.web3.storage/metrics
We want to rely on UCAN Stream metrics table to in a "prometheus style" increment metrics over time for totals. There are some metrics in Firehose that we can rely on for ad-hoc queries and business queries (like monthly usage). More than the price and efficiency in the long run for totals in the Firehose, there are some limitations that are explicit here:
aggregate/offer
we encode the very large list of pieces to put into the aggregate in a CBOR block, and inline it in the CAR of the invocation, while providingpieces
as CID of the block in the nb object.We will need most measures I wanted to handle, except for tracking execution time between the invocations. We need storacha/w3up#970 to get the power to track execution time of a UCAN effect (e.g. time between receipt of
aggregate/offer
andaggregate/accept