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

Metrics - Separate ColdStart metric from business metrics and their dimensions #125

Closed
heitorlessa opened this issue Aug 22, 2020 · 1 comment
Labels
feature-request feature request

Comments

@heitorlessa
Copy link
Contributor

heitorlessa commented Aug 22, 2020

Is your feature request related to a problem? Please describe.

When capturing cold start metric using the Metrics utility, it adds an additional dimension named function_name.

Based on how EMF and CloudWatch Metric visualization work, this means we accidentally have two operational modes:

  • Cold start behaviour: All custom metrics and ColdStart metric are plot with function_name, service, <any custom dimension> dimensions
  • Warm start behaviour: All custom metrics are plot with service, <any custom dimension>

This causes any custom metric to have data points in two different metrics with the same name when visualizing it, because from a CloudWatch point of view they're unique (different dimensions).

image

Describe the solution you'd like

After discussing this extensively with @cakepietoast and @nmoutschen, we could plot ColdStart metric as a separate EMF blob to ensure backwards compatibility, and prevent new data points to be split.

Describe alternatives you've considered

  • Adding function_name as a default dimension across all metrics - This would cause an increased billing on CloudWatch
  • Removing function_name dimension, and log function details as metadata - This would break existing customers dashboard, and make KPI impact analysis more difficult

Additional context

@heitorlessa heitorlessa added the feature-request feature request label Aug 22, 2020
heitorlessa referenced this issue in heitorlessa/aws-lambda-powertools-python Aug 22, 2020
heitorlessa referenced this issue in heitorlessa/aws-lambda-powertools-python Aug 22, 2020
heitorlessa referenced this issue in heitorlessa/aws-lambda-powertools-python Aug 22, 2020
* develop:
  chore: clarify changelog bugfix vs breaking change
  chore: remove/correct unnecessary debug logs
  chore: fix debug log adding unused obj
  improv: explicitly assert not having ColdStart metric
  chore: grammar
  chore: add metrics fix description
  fix: update cold_start doc to reflect #125
  fix: split ColdStart metric to its own EMF blob #125
  chore: correct typos
@heitorlessa
Copy link
Contributor Author

Released in 1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request
Projects
None yet
Development

No branches or pull requests

1 participant