Conversation
🦋 Changeset detectedLatest commit: c15a77a The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@gakonst i'll need to use the updated happy to open another PR on the README to document these necessary steps! |
| export interface MetricsOptions { | ||
| prefix: string | ||
| labels?: Object | ||
| } |
There was a problem hiding this comment.
@snario i based metrics.ts off of logger.ts and The Graph's Metrics. decided to keep it simple and not include passing in another registry as an option; lmk if you think that might be necessary for us though!
|
|
||
| export interface MetricsOptions { | ||
| prefix: string | ||
| labels?: Object |
There was a problem hiding this comment.
Should this have a more specific type?
There was a problem hiding this comment.
prom-client makes it so that it's generic: https://github.com/siimon/prom-client/blame/master/README.md#L83-L91
i'm imagining adding environment as a label but not sure yet, can make an issue to make this type specific as we finalize labels, or remove until we start using labels - what do you think?
No need for you to do anything, once this PR is merged, you'll see that the |
|
Running this locally, I get: |
|
last commit fixed the dtl build error cc @snario |
| this.name = name | ||
| this.options = mergeDefaultOptions(options, optionSettings) | ||
| this.logger = new Logger({ name }) | ||
| this.metrics = new Metrics({ prefix: name.split(' ').join('_') }) |
There was a problem hiding this comment.
Hm, this may be a bit annoying. Does the metrics client dislike spaces in service names? Perhaps we should refactor the BaseService such that names cannot have spaces in them so that the logs and metrics use identical names.
There was a problem hiding this comment.
https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels only underscores and colons 😬 honestly might be the move for cleanliness sake - thoughts on importing this validation and enforcing it? https://github.com/siimon/prom-client/blob/96f7495d66b1a21755f745b1367d3e530668a957/lib/validation.js#L5-L11 or should our validation be looser?
There was a problem hiding this comment.
just renamed everything without adding the validation since we will get the error on metrics initialization
|
The failure was due to not renaming message relayer metric, which resulted in the message relayer not being brought up. Fixed in c15a77a |
|
I've removed myself as a core-utils CODEOWNER for the time being. |
build(deps): update go-da to v0.1.0 build(deps): update go-da to v0.2.0; add ctx da: add cli flags for da config da: add get timeout to da client build(deps): bump local-celestia-devnet to v0.12.7 fix(cli): fix da rpc check fix(cli): check return err fix(da): blob data source reuse DataFromEVMTransactions da: upgrade to go-da v0.5.0 feat(op-batcher): support disable eth fallback chore(op-batcher): refactor EthFallbackDisabledFlagName da: use env auth token if set feat: enable multi frame txs and frame size setting for calldata txs chore: add log for multiframetxs setting da: try using blobdata for eth fallback da: add gas price flag (ethereum-optimism#451) da: reuse useblobs for multiframetxs (ethereum-optimism#452) Add Github CI (ethereum-optimism#472) Cleanup Github CI workflow (ethereum-optimism#478) feat: allow to toggle Celestia in op-batcher and op-node (ethereum-optimism#498) feat: add op-celestia indexer (ethereum-optimism#503) fix: init op-node client da: use celestia-node client (ethereum-optimism#504) da: fix batcher submit (ethereum-optimism#511)
build(deps): update go-da to v0.1.0 build(deps): update go-da to v0.2.0; add ctx da: add cli flags for da config da: add get timeout to da client build(deps): bump local-celestia-devnet to v0.12.7 fix(cli): fix da rpc check fix(cli): check return err fix(da): blob data source reuse DataFromEVMTransactions da: upgrade to go-da v0.5.0 feat(op-batcher): support disable eth fallback chore(op-batcher): refactor EthFallbackDisabledFlagName da: use env auth token if set feat: enable multi frame txs and frame size setting for calldata txs chore: add log for multiframetxs setting da: try using blobdata for eth fallback da: add gas price flag (ethereum-optimism#451) da: reuse useblobs for multiframetxs (ethereum-optimism#452) Add Github CI (ethereum-optimism#472) Cleanup Github CI workflow (ethereum-optimism#478) feat: allow to toggle Celestia in op-batcher and op-node (ethereum-optimism#498) feat: add op-celestia indexer (ethereum-optimism#503) fix: init op-node client
Description
We want to be collecting metrics in our TypeScript services. This PR adds a Metrics class to core-utils and uses it in base-service.
Additional context
The metrics class will be used to collect metrics in batch-submitter and data-transport-layer.