docs: Add comprehensive metrics documentation#647
Merged
daniyelnnr merged 1 commit intomasterfrom Dec 31, 2025
Merged
Conversation
This commit introduces two new markdown files: METRICS_CATALOG.md and METRICS_OVERVIEW.md. The METRICS_CATALOG.md provides a detailed catalog of all metrics available in the `@vtex/api` library, organized by their implementation types (diagnostics-based vs legacy). It includes sections on metrics architecture, visual summaries, and specific metrics for runtime, infrastructure, app, and middleware. The METRICS_OVERVIEW.md serves as a migration guide for transitioning from the legacy MetricsAccumulator API to the new DiagnosticsMetrics API. It outlines the benefits of migration, common patterns, best practices, and troubleshooting tips, ensuring a smooth transition for developers. Both documents aim to enhance understanding and usage of metrics within VTEX IO applications.
silvadenisaraujo
approved these changes
Dec 30, 2025
| │ ├── Disk: hits, total | ||
| │ └── Multilayer: hitRate, hits, total | ||
| │ | ||
| └── 💰 Billing Metrics (console.log with __VTEX_IO_BILLING) |
Contributor
There was a problem hiding this comment.
This billing 💰 do you know where it is used?
Contributor
Author
There was a problem hiding this comment.
I'm not sure if that metric is still used, or where... Maybe @arturpimentel has more context about it
| { endpoint: '/users', status: 'success', region: 'us-east' } | ||
| ``` | ||
|
|
||
| ### 5. Limit to 5 Attributes Maximum |
Contributor
There was a problem hiding this comment.
We limit this value today, but do we show an error if the users goes beyond it? Or we just drop them?
Contributor
Author
There was a problem hiding this comment.
Yep, we display a warning when the application is linked/under development - so we're assuming the developer is aware.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
This PR adds comprehensive documentation for the metrics system in @vtex/api. It introduces two new documentation files that provide detailed information about available metrics and guidance on migrating to the new DiagnosticsMetrics API.
What problem is this solving?
Currently, there is limited documentation about:
This documentation addresses these gaps by providing a complete reference guide and migration documentation.
Screenshots or example usage
The documentation includes:
Types of changes