Skip to content

Docs: code examples for logger and metrics have compile errors. #510

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

Closed
michaelbrewer opened this issue Jan 25, 2022 · 7 comments
Closed
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation

Comments

@michaelbrewer
Copy link
Contributor

michaelbrewer commented Jan 25, 2022

Bug description

Provided code examples have compile errors. And the to the Tracer from the readme is broken

Expected Behavior

Code examples should compile

Current Behavior

Code examples don't all compile

Possible Solution

Fix code examples

Steps to Reproduce

  1. Click on Tracer link goes to 404
  2. metrics / logger examples have compile errors in webstorm and vscode
cd packages/metrics
npx tsc examples/*.ts

Environment

  • Powertools version used: main
  • Packaging format (Layers, npm):
  • AWS Lambda function runtime:
  • Debugging logs:

Related issues, RFCs

@michaelbrewer michaelbrewer added bug Something isn't working triage This item has not been triaged by a maintainer, please wait labels Jan 25, 2022
@flochaz
Copy link
Contributor

flochaz commented Jan 25, 2022

Indeed, thx for reporting this, we were planning to potentially remove them since they are duplication of unit tests and global examples.

@michaelbrewer
Copy link
Contributor Author

Ok. then there is also uploading the Readme, of whether or not to point out these examples or not.

Example projects are really handy if they work :)

@michaelbrewer
Copy link
Contributor Author

The Tracer example also goes to a 404:

Screen Shot 2022-01-25 at 12 36 26 PM

@flochaz
Copy link
Contributor

flochaz commented Jan 25, 2022

Example projects are really handy if they work :)

The issue with current per package examples as they are today is that they can't really be copied and paste since their imports point to local implementation (for instance: import { Logger } from '../src';) so we were tempted to go more for what is in root examples folder to have only "compilable"/"deployable" examples and remove the packages' level one.

@flochaz
Copy link
Contributor

flochaz commented Jan 25, 2022

The Tracer example also goes to a 404:

Screen Shot 2022-01-25 at 12 36 26 PM

Indeed that's bad ...

@michaelbrewer
Copy link
Contributor Author

Either way the immediate fix is in my PR.

@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi added this to the production-ready-release milestone Feb 28, 2022
@dreamorosi dreamorosi removed the triage This item has not been triaged by a maintainer, please wait label Oct 19, 2022
@dreamorosi dreamorosi changed the title examples: code examples for logger and metrics have compile errors. Docs: code examples for logger and metrics have compile errors. Nov 14, 2022
@dreamorosi dreamorosi added documentation Improvements or additions to documentation and removed bug Something isn't working labels Nov 14, 2022
@dreamorosi dreamorosi added the completed This item is complete and has been merged/shipped label Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants