From c1a158b85b6b161de1589b5fb652851cbee0b6b2 Mon Sep 17 00:00:00 2001 From: Yao Zhao Date: Mon, 10 Aug 2020 14:40:30 -0700 Subject: [PATCH 1/2] Fixed typos in README --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 98559567..1eb77d0a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Generate CloudWatch Metrics embedded within structured log events. The embedded - **Linking metrics to high cardinality context** -Using the Embedded Metric Format, you will be able to visualize and alarm on custom metrics, but also retain the original, detailed and high-cardinality context which is queryable using [CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). For example, the library automatically injects environment metadata such as Lambda Function version, EC2 instance and image ids into the structured log event data. + Using the Embedded Metric Format, you will be able to visualize and alarm on custom metrics, but also retain the original, detailed and high-cardinality context which is queryable using [CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). For example, the library automatically injects environment metadata such as Lambda Function version, EC2 instance and image ids into the structured log event data. Be sure to: ## Usage @@ -63,7 +63,7 @@ Requirements: Examples: ```java -put_metric("Latency", 200, Unit.MILLISECONDS) +putMetric("Latency", 200, Unit.MILLISECONDS) ``` - MetricsLogger **putProperty**(String key, Object value ) @@ -78,7 +78,7 @@ Examples: ```java putProperty("RequestId", "422b1569-16f6-4a03-b8f0-fe3fd9b100f8") -putPropertyproperty("InstanceId", "i-1234567890") +putProperty("InstanceId", "i-1234567890") putPproperty("Device", new HashMap() {{ put("Id", "61270781-c6ac-46f1-baf7-22c808af8162"); put("Name", "Transducer"); @@ -171,7 +171,7 @@ Configuration config = EnvironmentConfigurationProvider.getConfig(); config.setServiceName("MyApp") # environment -AWS_EMF_SERVICE_NAME = MyApp +AWS_EMF_SERVICE_NAME="MyApp" ``` **ServiceType**: Overrides the type of the service. For services where the type cannot be inferred (e.g. Java process running on EC2), a default value of Unknown will be used if not explicitly set. @@ -213,7 +213,7 @@ Configuration config = EnvironmentConfigurationProvider.getConfig(); config.setLogGroupName("LogGroupName") # environment -AWS_EMF_LOG_GROUP_NAME=LogGroupName +AWS_EMF_LOG_GROUP_NAME="LogGroupName" ``` **LogStreamName**: For agent-based platforms, you may optionally configure the destination log stream that metrics should be delivered to. This value will be passed from the library to the agent in the Embedded Metric payload. If a LogGroup is not provided, the default value will be derived by the agent (this will likely be the hostname). @@ -234,7 +234,7 @@ Configuration config = EnvironmentConfigurationProvider.getConfig(); config.setLogStreamName(LogStreamName)) # environment -AWS_EMF_LOG_STREAM_NAME=LogStreamName +AWS_EMF_LOG_STREAM_NAME="LogStreamName" ``` **EnvironmentOverride**: Short circuit auto-environment detection by explicitly defining how events should be sent. This is not supported through programmatic access. From 0f04cdafd4d1fa25f58c4ff109079e58b6642752 Mon Sep 17 00:00:00 2001 From: Yao Zhao Date: Mon, 10 Aug 2020 14:43:06 -0700 Subject: [PATCH 2/2] Fixed spotless --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1eb77d0a..43361a18 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Generate CloudWatch Metrics embedded within structured log events. The embedded - **Linking metrics to high cardinality context** - Using the Embedded Metric Format, you will be able to visualize and alarm on custom metrics, but also retain the original, detailed and high-cardinality context which is queryable using [CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). For example, the library automatically injects environment metadata such as Lambda Function version, EC2 instance and image ids into the structured log event data. + Using the Embedded Metric Format, you will be able to visualize and alarm on custom metrics, but also retain the original, detailed and high-cardinality context which is queryable using [CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). For example, the library automatically injects environment metadata such as Lambda Function version, EC2 instance and image ids into the structured log event data. Be sure to: ## Usage