-
Notifications
You must be signed in to change notification settings - Fork 19
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: include js-ceramic and ceramic-one version in request creation metric #1232
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import { | |
AnchorRequestParamsParser, | ||
RequestAnchorParams, | ||
RequestAnchorParamsCodec, | ||
RequestAnchorParamsV3, | ||
} from '../ancillary/anchor-request-params-parser.js' | ||
import bodyParser from 'body-parser' | ||
import { type RequestService, RequestDoesNotExistError } from '../services/request-service.js' | ||
|
@@ -124,7 +125,12 @@ export class RequestController { | |
|
||
// request was newly created | ||
if (body) { | ||
Metrics.count(METRIC_NAMES.CTRL_NEW_ANCHOR_REQUEST, 1, { source: parseOrigin(req) }) | ||
const v3Params = requestParams as RequestAnchorParamsV3 | ||
Metrics.count(METRIC_NAMES.CTRL_NEW_ANCHOR_REQUEST, 1, { | ||
source: parseOrigin(req), | ||
jsCeramicVersion: v3Params.jsCeramicVersion, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gvelez17 is this sufficient to get what we want to track what version people are running based on the requests coming into CAS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that for nodes that haven't upgraded, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also add this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We certainly could, but seems less useful and there is some cost in bandwidth to sending this on every request. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I figured how many requests are created by which versions was a more useful metric than how much polling is happening from which versions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should be - we don't really want more than 2 version parameters per node, I would think. these are the key ones. If something else changes we can try to enforce bumping the minor version of js-ceramic to recognize it |
||
ceramicOneVersion: v3Params.ceramicOneVersion, | ||
}) | ||
return res.status(StatusCodes.CREATED).json(body) | ||
} | ||
|
||
|
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.
Are these still "legacy" 😅?
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.
yeah it's not, it's now back to being the main expected path. I thought about renaming it but then it will break continuity with the existing metric name. @gvelez17 curious your thoughts on if this is worth renaming now or not?
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.
hm I don't think i named this, i do not see
cas_server_ctrl_legacy_requested_total
on any of the primary cas dashboards (tho i didn't do a comprehensive search). I think, since a number of metrics are in flux anyway, I would not worry about historical continuity right now, go ahead and rename it appropriately!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.
renamed to
ctrl_json_requested
, which is a more descriptive and accurate parallel toctrl_car_requested