Skip to content

improv: Better namespace/dimension handling for Metrics - #62

Merged
heitorlessa merged 9 commits into
developfrom
improv/metrics_interface_fix
Jun 7, 2020
Merged

improv: Better namespace/dimension handling for Metrics#62
heitorlessa merged 9 commits into
developfrom
improv/metrics_interface_fix

Conversation

@to-mc

@to-mcto-mc commented Jun 7, 2020

Copy link
Copy Markdown
Contributor

Issue #, if available:#61

Description of changes:

Changes behavior introduced in #60: Service name passed to metrics constructor (or POWERTOOLS_SERVICE_NAME env var) will be used to create a service dimension rather than setting the namespace. Namespace can be set using the namespace parameter in Metrics constructor, or POWERTOOLS_METRICS_NAMESPACE env var.

Breaking change checklist

Ignore if it's not a breaking change

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@to-mcto-mc changed the title improv: Improv/metrics interface fiximprov: Better namespace/dimension handling for MetricsJun 7, 2020
@to-mc
to-mc requested a review from heitorlessaJune 7, 2020 09:21
@codecov-commenter

codecov-commenter commented Jun 7, 2020

Copy link
Copy Markdown

Codecov Report

Merging #62 into develop will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@## develop #62 +/- ##
========================================
Coverage 99.39% 99.39% ========================================
Files 15 15 Lines 492 496 +4 Branches 44 45 +1 ========================================
+ Hits 489 493 +4 
Misses 3 3 
Impacted FilesCoverage Δ
aws_lambda_powertools/metrics/base.py100.00% <100.00%> (ø)
aws_lambda_powertools/metrics/metric.py100.00% <100.00%> (ø)
aws_lambda_powertools/metrics/metrics.py100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f074de...0e81377. Read the comment docs.

@to-mc
to-mc requested a review from nmoutschenJune 7, 2020 09:53
Comment threaddocs/content/core/metrics.mdx Outdated
Comment threadexample/template.yaml
@heitorlessa
heitorlessa merged commit 32459e2 into developJun 7, 2020
@heitorlessa
heitorlessa deleted the improv/metrics_interface_fix branch June 7, 2020 13:47
@to-mcto-mc mentioned this pull request Jun 7, 2020
6 tasks
heitorlessa added a commit that referenced this pull request Jun 7, 2020
* develop:
improv: include example tests in `make tests` (#63)
chore: rename Makefile target docs-dev to docs-local (#65)
improv: better namespace/dimension handling for Metrics (#62)
heitorlessa added a commit that referenced this pull request Jun 10, 2020
* develop: (31 commits)
docs: fix contrast on highlighted code text (#73)
feat: improve error handling for log_metrics decorator (#71)
chore(deps): bump graphql-playground-html from 1.6.19 to 1.6.25 in /docs
feat: add high level imports (#70)
fix: correct env var name for publish to pypi test (#69)
chore: version bump (#68)
feat: add capture_cold_start_metric for log_metrics (#67)
chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 in /docs (#66)
feat: automate publishing to pypi (#58)
feat: add pre-commit hooks (#64)
improv: include example tests in `make tests` (#63)
chore: rename Makefile target docs-dev to docs-local (#65)
improv: better namespace/dimension handling for Metrics (#62)
docs: build on master only
chore: correct docstring for log_metrics
chore: fix typo in metrics doc
chore: Correct test comment
chore: remove unused import
chore: formatting
feat: update Metrics interface to resemble tracer & logger: use "service" as its namespace.
...
heitorlessa referenced this pull request in heitorlessa/aws-lambda-powertools-python Jun 17, 2020
* improv: namespace/dimension changes
Use service name for default dimension instead of namespace
Add namespace parameter
* docs: document changes to namespace/service
* chore: fix typo in docstring
* chore: fix typo in docs
* chore: fix test comments
* chore: Add env var for namespace back into example app
* chore: correct typo in docs
* chore: update example in README
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@to-mc@codecov-commenter@heitorlessa