-
Notifications
You must be signed in to change notification settings - Fork 145
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
docs(metrics): extract Metrics code snippets in separate files #1245
docs(metrics): extract Metrics code snippets in separate files #1245
Conversation
@dreamorosi please review this commit and read the TODO items described in the comment. this PR solves issue #1221 |
@@ -156,16 +126,7 @@ You can call `addMetric()` with the same name multiple times. The values will be | |||
=== "addMetric() with the same name" | |||
|
|||
```typescript hl_lines="8 10" | |||
import { Metrics, MetricUnits } from '@aws-lambda-powertools/metrics'; |
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.
Could you please change the line above (L128) to:
```typescript hl_lines="7 9"
this is not an error you introduced but I just noticed that the highlighted lines are not correct, so let's fix it.
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.
@dreamorosi , sure, take a look .
@niko-achilles could you please rebase the branch before we merge it? I see the diff from other commits are here. git checkout main
git fetch origin
git pull origin main
git checkout my_branch_name
git rebase main
...
git push origin my_branch_name -f |
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.
Thanks for addressing the comments, could you please rebase the branch (see previous message).
503b982
to
4b3b81d
Compare
@dreamorosi now we have 2 commits as expected , thanks for the command tips |
Description of your changes
The code snippets are extracted to their own separate files, placed under docs/snippets/metrics.
And project documentation in docs/core/metrics.md references the code snippets, which are extracted to their own separate files.
Code snippets of metrics created, in path docs/snippets/metrics:
Each code snippet is referenced as --8<-- "docs/snippets/metrics/.ts" in docs/core/metrics.md .
TODO items:
How to verify this change
Modified docs/core/metrics.md
Added code snippets as .ts files in path docs/snippets/metrics
Related issues, RFCs
Issue number: #1221 #729
PR status
Is this ready for review?: YES
Is it a breaking change?: NO
Checklist
Breaking change checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.