Skip to content

feat: add otel spec#1

Merged
alexghr merged 1 commit into
AztecProtocol:mainfrom
alexghr:alexg/feat/metrics
Jun 24, 2024
Merged

feat: add otel spec#1
alexghr merged 1 commit into
AztecProtocol:mainfrom
alexghr:alexg/feat/metrics

Conversation

@alexghr

@alexghr alexghr commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

No description provided.

- we will use base units for values (e.g. `bytes` over `kilobytes` and `seconds` over `milliseconds`)
- we will _not_ include the unit in the name (there's a separate attribute for that, see code examples)

TBD `meter` naming conventions (ie. `metrics.getMeter('RealPublicKernelCircuitSimulator')`)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class name seems reasonable to me!

public async publicKernelCircuitSetup(input: PublicKernelCircuitPrivateInputs): Promise<PublicKernelCircuitPublicInputs> {
// ...

this.circuitSimulationMetric.record(duration / 1000, {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duration * 1000

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, forgot to get back to you on this. The latest recommendation is to use seconds over milliseconds for duration metrics. I've updated the proving code to return a durationMs field instead of the unitless duration we had before.

open-telemetry/opentelemetry-specification#2977

- [ ] AVM
- [x] Sequencer
- [ ] Fees
- [ ] P2P Network

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we plug the metrics into the P2P module? Would be great if we can.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into getting some stats out of it

@alexghr alexghr force-pushed the alexg/feat/metrics branch from 82a22cf to a7a4245 Compare June 24, 2024 08:11
@alexghr alexghr merged commit d0774d8 into AztecProtocol:main Jun 24, 2024
@alexghr alexghr deleted the alexg/feat/metrics branch June 24, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants