-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update environment variable tables for utilities (#1153)
* chore(docs): update environment variable table * Correct the default value for the POWERTOOLS_METRICS_NAMESPACE env var * Refer reader to utility page for further info on env vars * chore(docs): add default, allowed and example values to utility docs * Extract default and allowed values from description to their own cols * Add allowed values, example and default columns * Correct default value for metrics namespace * refactor: set default service name in utility class Previously the Metric and Tracer classes did not set a service name if one was not provided. There was no default service name. This commit sets a default service name in the Utility class, and updates the Tracer, Metric and Logger classes to use it. * test: fix Logger tests Add missing `defaultServiceName` property to expected Logger object Correct typo in test names * test(tracer): remove invalid test Remove a test that is no longer valid. As there is a default service name, the tracer should not be enabled even if there is a service name Update the `addServiceAnnotation` function to remove redundant check * docs(metrics): correct default value * test(metrics): update metric tests to account for default service dim The `service_name` is now set by default. This means it is always present in metric dimensions. This commit updates the tests to account for this change * test(tracer): add test for default service name * test(utility): add test for new method Add test for getDefaultServiceName method * test(utility): fix getdefaultservicename test * refactor: extract isvalidservicename method to utility class This commit extracts the isValidServiceName method from the Tracer class to the Utility class. * test(utility): fix test description * refactor: change utility class methods from public to protected * test(utility): refactor tests to allow for protected methods * docs(index): remove quotation marks from default values * test(metrics): add comments to explain magic numbers * doc(tracer): add explanation for definite assignment assertion operator * test(tracer): refactor test to match project norms
- Loading branch information
1 parent
664c4da
commit c37932d
Showing
13 changed files
with
128 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.