Closed
Description
What were you searching in the docs?
Currently the code snippets in the documentation under the Tracer's section are hardcoded as part of the page's markdown.
This authoring experience, which doesn't provide linting, is error prone, which causes issues in the docs and in turns to users.
This issue is part of a larger effort being tracked at #729.
Is this related to an existing documentation section?
https://awslabs.github.io/aws-lambda-powertools-typescript/latest/core/tracer/
How can we improve?
The code snippets should be extracted to their own separate files, placed under docs/snippets/tracer
.
So for instance, the first snippet that currently reads:
import { Tracer } from '@aws-lambda-powertools/tracer';
const tracer = new Tracer({ serviceName: 'serverlessAirline' });
export const handler = async (_event, _context): Promise<void> => {
// ...
};
would be replaced with:
--8<-- "docs/snippets/tracer/basicUsage.ts"
And the content should be placed in its own file at the path: docs/snippets/tracer/basicUsage.ts
.
This applies to all TypeScript code snippets of the page.
Got a suggestion in mind?
No response
Acknowledgment
- I understand the final update might be different from my proposed suggestion, or refused.