Skip to content

Feature request: Option to setLogger for metrics as it is done with tracer #3099

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
2 tasks done
jorgevrgs opened this issue Sep 20, 2024 · 5 comments
Closed
2 tasks done
Labels
duplicate This issue is a duplicate of an existing one feature-request This item refers to a feature request for an existing or new utility metrics This item relates to the Metrics Utility

Comments

@jorgevrgs
Copy link

Use case

Currently, tracer.provider.setLogger(logger) allows the customization of the logger. However, in the Metrics class there is not an option to do the same.

Solution/User Experience

Instead of only using this.setConsole() here as a private method, it is possible to update the MetricsOptions and receive a logger there.

Alternative solutions

- Update `MetricsOptions` to receive a custom logger
- Expose `setConsole` method as public and receive a param `logger: Logger` of the same type of `tracer.provider.setLogger`.

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

@jorgevrgs jorgevrgs added feature-request This item refers to a feature request for an existing or new utility triage This item has not been triaged by a maintainer, please wait labels Sep 20, 2024
Copy link

boring-cyborg bot commented Sep 20, 2024

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@dreamorosi
Copy link
Contributor

Hi, thank you for opening this issue.

We already have an issue to track this at #2126, and a PR open to implement this at #3057.

@jorgevrgs
Copy link
Author

Thank you so much for replying. I guess I used the wrong terms when I was looking for an existing topic about the same issue 🙂.

@dreamorosi dreamorosi added duplicate This issue is a duplicate of an existing one metrics This item relates to the Metrics Utility and removed triage This item has not been triaged by a maintainer, please wait labels Sep 27, 2024
@dreamorosi
Copy link
Contributor

No worries, it's not easy to keep track of existing issues and the title of that one wasn't super clear.

I'm going to close this in favor of #2126, which should also be closed soon.

@dreamorosi dreamorosi closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
@dreamorosi dreamorosi moved this from Coming soon to Closed in Powertools for AWS Lambda (TypeScript) Sep 27, 2024
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

This issue is now closed. Please be mindful that future comments 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue is a duplicate of an existing one feature-request This item refers to a feature request for an existing or new utility metrics This item relates to the Metrics Utility
Projects
Development

No branches or pull requests

2 participants