Skip to content
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

Feature request: CloudWatch Infrequent Access log class support for metrics #1812

Open
2 tasks done
alfaproject opened this issue Dec 7, 2023 · 8 comments
Open
2 tasks done
Labels
feature-request This item refers to a feature request for an existing or new utility metrics This item relates to the Metrics Utility need-customer-feedback Requires more customers feedback before making or revisiting a decision on-hold This item is on-hold and will be revisited in the future

Comments

@alfaproject
Copy link

Use case

We generate terabytes of logs per month and thus will switch all of our CloudWatch log to the new Infrequent Access log class to basically save 50% of log costs which is quite substantial: https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-log-class-for-infrequent-access-logs-at-a-reduced-price/

However, that means no support for EMF and thus the metrics middleware will stop working )':

I'm hereby suggesting to add support to send metrics directly in addition to EMF, perhaps with another adapter?

Solution/User Experience

Exactly the same APIs used in metrics middleware but instead of logging EMF to CloudWatch, just use the CloudWatch API to publish the metrics directly as an alternate adapter/solution

Alternative solutions

We are building our own custom middleware to be able to support this but eh, support here would be lovely

Acknowledgment

Future readers

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

@alfaproject alfaproject added triage This item has not been triaged by a maintainer, please wait feature-request This item refers to a feature request for an existing or new utility labels Dec 7, 2023
Copy link

boring-cyborg bot commented Dec 7, 2023

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

@am29d
Copy link
Contributor

am29d commented Dec 7, 2023

Hey @alfaproject thanks for raising the PR!

This is definitely an important topic to tackle. The team is partially back from reInvent now and we have already had first discussions. We'd need a bit more time to align on all runtimes to provide consistent experience across languages and will follow up shortly on this matter.

@am29d am29d added metrics This item relates to the Metrics Utility need-customer-feedback Requires more customers feedback before making or revisiting a decision and removed triage This item has not been triaged by a maintainer, please wait labels Dec 7, 2023
@dreamorosi
Copy link
Contributor

It's important to note that adding API calls will add latency to each invocation upon flushing and depending on how many metrics you emit it will also incur into additional pricing, which could end up decreasing or cancelling the savings derived from using the infrequent access class.

Either way, let's leave the issue open for a while and revisit in a few months based on customer feedback.

@alfaproject
Copy link
Author

@dreamorosi that's why it's an alternate adapter and doesn't have to be the default. Whatever exists is fine, but we'll need another way to publish metrics.

I guess we'll do our own metrics middleware then but it would have been nice to use this library.

@dreamorosi
Copy link
Contributor

cc @aws-powertools/lambda-python-core folks, what do you think about this feature request?

I've already expressed my opinion above but I'm copying you since it was marked also for other languages.

@dreamorosi dreamorosi added the discussing The issue needs to be discussed, elaborated, or refined label Dec 8, 2023
@rubenfonseca
Copy link
Contributor

I believe this makes sense, since we already implement it in a way that allows easily to add more adapters. So we could benefit from a CloudWatch API provider in this case.

@leandrodamascena
Copy link
Contributor

Sorry @dreamorosi, I completely missed this issue!

I think it makes sense for us to create a new provider with a CloudWatch API under the hood. Our current provider using EMF is very good because customer don't have network overhead, nor do they have to pay for the cost of APICall, but with these new improvements like LogClass (which doesn't support EMF), or even better error handling/visibility than we have with EMF, customers can continue to take advantage of the excellent experience provided by Powertools and use the provider with API Calls.

We should consider this provider in @aws-powertools/lambda-python-core as well.

@dreamorosi
Copy link
Contributor

Revisiting the issue after a few months - so far our position remains unchanged.

We think that there could be value in adding a Metrics provider that publishes metrics using the Metrics API, but so far there hasn't been any material interest.

We'll check back in a few months to see if things have changed.

@dreamorosi dreamorosi added revisit-in-3-months Blocked issues/PRs that need to be revisited and removed revisit-in-3-months Blocked issues/PRs that need to be revisited labels Jul 30, 2024
@dreamorosi dreamorosi added on-hold This item is on-hold and will be revisited in the future and removed discussing The issue needs to be discussed, elaborated, or refined revisit-in-3-months Blocked issues/PRs that need to be revisited labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This item refers to a feature request for an existing or new utility metrics This item relates to the Metrics Utility need-customer-feedback Requires more customers feedback before making or revisiting a decision on-hold This item is on-hold and will be revisited in the future
Projects
Development

No branches or pull requests

5 participants