diff --git a/aws/logs_monitoring/enhanced_lambda_metrics.py b/aws/logs_monitoring/enhanced_lambda_metrics.py index 1e623a4d6..e494d3c01 100644 --- a/aws/logs_monitoring/enhanced_lambda_metrics.py +++ b/aws/logs_monitoring/enhanced_lambda_metrics.py @@ -297,6 +297,17 @@ def parse_get_resources_response_for_tags_by_arn(get_resources_page): return tags_by_arn +def get_forwarder_telemetry_prefix_and_tags(): + """Retrieves prefix and tags used when submitting telemetry metrics + Used to overcome circular import""" + from lambda_function import ( + DD_FORWARDER_TELEMETRY_NAMESPACE_PREFIX, + DD_FORWARDER_TELEMETRY_TAGS, + ) + + return DD_FORWARDER_TELEMETRY_NAMESPACE_PREFIX, DD_FORWARDER_TELEMETRY_TAGS + + def build_tags_by_arn_cache(): """Makes API calls to GetResources to get the live tags of the account's Lambda functions @@ -307,14 +318,14 @@ def build_tags_by_arn_cache(): """ tags_by_arn_cache = {} get_resources_paginator = resource_tagging_client.get_paginator("get_resources") + prefix, tags = get_forwarder_telemetry_prefix_and_tags() try: for page in get_resources_paginator.paginate( ResourceTypeFilters=[GET_RESOURCES_LAMBDA_FILTER], ResourcesPerPage=100 ): lambda_stats.distribution( - "{}.get_resources_api_calls".format(ENHANCED_METRICS_NAMESPACE_PREFIX), - 1, + "{}.get_resources_api_calls".format(prefix), 1, tags=tags, ) page_tags_by_arn = parse_get_resources_response_for_tags_by_arn(page) tags_by_arn_cache.update(page_tags_by_arn) diff --git a/aws/logs_monitoring/lambda_function.py b/aws/logs_monitoring/lambda_function.py index d1b257890..d086791a2 100644 --- a/aws/logs_monitoring/lambda_function.py +++ b/aws/logs_monitoring/lambda_function.py @@ -148,6 +148,11 @@ def compileRegex(rule, pattern): ] +# Used to build and pass aws.dd_forwarder.* telemetry tags +DD_FORWARDER_TELEMETRY_TAGS = [] +DD_FORWARDER_TELEMETRY_NAMESPACE_PREFIX = "aws.dd_forwarder" + + class RetriableException(Exception): pass @@ -389,7 +394,7 @@ def datadog_forwarder(event, context): metrics, logs, trace_payloads = split(enrich(parse(event, context))) if DD_FORWARD_LOG: - forward_logs(filter_logs(map(json.dumps, logs))) + forward_logs(logs) forward_metrics(metrics) @@ -404,6 +409,7 @@ def datadog_forwarder(event, context): def forward_logs(logs): """Forward logs to Datadog""" + logs_to_forward = filter_logs(list(map(json.dumps, logs))) scrubber = DatadogScrubber(SCRUBBING_RULE_CONFIGS) if DD_USE_TCP: batcher = DatadogBatcher(256 * 1000, 256 * 1000, 1) @@ -415,7 +421,7 @@ def forward_logs(logs): ) with DatadogClient(cli) as client: - for batch in batcher.batch(logs): + for batch in batcher.batch(logs_to_forward): try: client.send(batch) except Exception: @@ -424,10 +430,17 @@ def forward_logs(logs): if logger.isEnabledFor(logging.DEBUG): logger.debug(f"Forwarded log batch: {json.dumps(batch)}") + lambda_stats.distribution( + "{}.logs_forwarded".format(DD_FORWARDER_TELEMETRY_NAMESPACE_PREFIX), + len(logs_to_forward), + tags=DD_FORWARDER_TELEMETRY_TAGS, + ) + def parse(event, context): """Parse Lambda input to normalized events""" metadata = generate_metadata(context) + event_type = "unknown" try: # Route to the corresponding parser event_type = parse_event_type(event) @@ -448,9 +461,25 @@ def parse(event, context): ) events = [err_message] + set_forwarder_telemetry_tags(context, event_type) + return normalize_events(events, metadata) +def set_forwarder_telemetry_tags(context, event_type): + """Helper function to set tags on telemetry metrics + Do not submit telemetry metrics before this helper function is invoked + """ + global DD_FORWARDER_TELEMETRY_TAGS + + DD_FORWARDER_TELEMETRY_TAGS = [ + f"forwardername:{context.function_name.lower()}", + f"forwarder_memorysize:{context.memory_limit_in_mb}", + f"forwarder_version:{DD_FORWARDER_VERSION}", + f"event_type:{event_type}", + ] + + def enrich(events): """Adds event-specific tags and attributes to each event @@ -572,6 +601,7 @@ def generate_metadata(context): "forwarder_memorysize": context.memory_limit_in_mb, "forwarder_version": DD_FORWARDER_VERSION, } + metadata[DD_CUSTOM_TAGS] = ",".join( filter( None, @@ -675,6 +705,12 @@ def forward_metrics(metrics): if logger.isEnabledFor(logging.DEBUG): logger.debug(f"Forwarded metric: {json.dumps(metric)}") + lambda_stats.distribution( + "{}.metrics_forwarded".format(DD_FORWARDER_TELEMETRY_NAMESPACE_PREFIX), + len(metrics), + tags=DD_FORWARDER_TELEMETRY_TAGS, + ) + def forward_traces(trace_payloads): try: @@ -687,13 +723,22 @@ def forward_traces(trace_payloads): if logger.isEnabledFor(logging.DEBUG): logger.debug(f"Forwarded traces: {json.dumps(trace_payloads)}") + lambda_stats.distribution( + "{}.traces_forwarded".format(DD_FORWARDER_TELEMETRY_NAMESPACE_PREFIX), + len(trace_payloads), + tags=DD_FORWARDER_TELEMETRY_TAGS, + ) + # Utility functions def normalize_events(events, metadata): normalized = [] + events_counter = 0 + for event in events: + events_counter += 1 if isinstance(event, dict): normalized.append(merge_dicts(event, metadata)) elif isinstance(event, str): @@ -701,6 +746,14 @@ def normalize_events(events, metadata): else: # drop this log continue + + """Submit count of total events""" + lambda_stats.distribution( + "{}.incoming_events".format(DD_FORWARDER_TELEMETRY_NAMESPACE_PREFIX), + events_counter, + tags=DD_FORWARDER_TELEMETRY_TAGS, + ) + return normalized diff --git a/aws/logs_monitoring/tests/test_forwarder_telemetry.py b/aws/logs_monitoring/tests/test_forwarder_telemetry.py new file mode 100644 index 000000000..e69de29bb diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot index a76f33504..3a6381a37 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot @@ -44,6 +44,57 @@ "host": "testLogGroup" } ] + }, + { + "path": "/api/v1/distribution_points?api_key=abcdefghijklmnopqrstuvwxyz012345", + "verb": "POST", + "content-type": "application/json", + "data": { + "series": [ + { + "metric": "aws.dd_forwarder.incoming_events", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.logs_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.metrics_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + } + ] + } } ] } \ No newline at end of file diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot index 40d4661de..0a0fbbe64 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot @@ -72,6 +72,57 @@ "host": "arn:aws:lambda:us-east-1:0:function:storms-cloudwatch-event" } ] + }, + { + "path": "/api/v1/distribution_points?api_key=abcdefghijklmnopqrstuvwxyz012345", + "verb": "POST", + "content-type": "application/json", + "data": { + "series": [ + { + "metric": "aws.dd_forwarder.incoming_events", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.logs_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.metrics_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + } + ] + } } ] } \ No newline at end of file diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot index 49ed4988d..248c0d0f1 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot @@ -25,6 +25,57 @@ "host": "testLogGroup" } ] + }, + { + "path": "/api/v1/distribution_points?api_key=abcdefghijklmnopqrstuvwxyz012345", + "verb": "POST", + "content-type": "application/json", + "data": { + "series": [ + { + "metric": "aws.dd_forwarder.incoming_events", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.logs_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.metrics_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + } + ] + } } ] } \ No newline at end of file diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot index 8de900130..18191ba22 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot @@ -379,19 +379,19 @@ "start": "1583425836164691700", "duration": "458278320", "meta": { - "account_id": "0", - "language": "javascript", - "forwarder_memorysize": "1536", "region": "us-east-1", "_dd.origin": "lambda", + "account_id": "0", + "forwarder_version": "3.16.4", + "forwarder_memorysize": "1536", + "aws_account": "0", "functionname": "hello-dog-node-dev-hello12x", "forwardername": "test", - "aws_account": "0", - "forwarder_version": "3.16.4" + "language": "javascript" }, "metrics": { - "_sample_rate": 1.0, - "_sampling_priority_v1": 2.0 + "_sampling_priority_v1": 2.0, + "_sample_rate": 1.0 } }, { @@ -404,19 +404,19 @@ "start": "1583425836623188200", "duration": "13428", "meta": { - "functionname": "hello-dog-node-dev-hello12x", + "_dd.origin": "lambda", "language": "javascript", - "forwardername": "test", + "account_id": "0", + "functionname": "hello-dog-node-dev-hello12x", "aws_account": "0", - "forwarder_memorysize": "1536", - "_dd.origin": "lambda", "forwarder_version": "3.16.4", - "account_id": "0", - "region": "us-east-1" + "region": "us-east-1", + "forwarder_memorysize": "1536", + "forwardername": "test" }, "metrics": { - "_sampling_priority_v1": 2.0, - "_sample_rate": 1.0 + "_sample_rate": 1.0, + "_sampling_priority_v1": 2.0 } }, { @@ -429,19 +429,19 @@ "start": "1583425836623169000", "duration": "35645", "meta": { - "region": "us-east-1", - "account_id": "0", "forwardername": "test", - "language": "javascript", "_dd.origin": "lambda", "functionname": "hello-dog-node-dev-hello12x", - "forwarder_memorysize": "1536", + "language": "javascript", "aws_account": "0", - "forwarder_version": "3.16.4" + "account_id": "0", + "forwarder_memorysize": "1536", + "forwarder_version": "3.16.4", + "region": "us-east-1" }, "metrics": { - "_sampling_priority_v1": 2.0, - "_sample_rate": 1.0 + "_sample_rate": 1.0, + "_sampling_priority_v1": 2.0 } }, { @@ -454,15 +454,15 @@ "start": "1583425836623226000", "duration": "9277", "meta": { + "region": "us-east-1", "forwarder_version": "3.16.4", - "forwardername": "test", + "language": "javascript", "aws_account": "0", "forwarder_memorysize": "1536", "account_id": "0", - "language": "javascript", "functionname": "hello-dog-node-dev-hello12x", - "region": "us-east-1", - "_dd.origin": "lambda" + "_dd.origin": "lambda", + "forwardername": "test" }, "metrics": { "_sampling_priority_v1": 2.0, @@ -479,19 +479,19 @@ "start": "1583425836623211000", "duration": "26367", "meta": { - "forwarder_memorysize": "1536", "language": "javascript", + "forwardername": "test", + "account_id": "0", "functionname": "hello-dog-node-dev-hello12x", - "aws_account": "0", + "_dd.origin": "lambda", "region": "us-east-1", + "aws_account": "0", "forwarder_version": "3.16.4", - "forwardername": "test", - "_dd.origin": "lambda", - "account_id": "0" + "forwarder_memorysize": "1536" }, "metrics": { - "_sampling_priority_v1": 2.0, - "_sample_rate": 1.0 + "_sample_rate": 1.0, + "_sampling_priority_v1": 2.0 } }, { @@ -504,15 +504,15 @@ "start": "1583425836623111700", "duration": "127197", "meta": { - "region": "us-east-1", - "_dd.origin": "lambda", - "account_id": "0", - "language": "javascript", "forwarder_memorysize": "1536", + "region": "us-east-1", + "forwarder_version": "3.16.4", "functionname": "hello-dog-node-dev-hello12x", + "account_id": "0", "aws_account": "0", - "forwarder_version": "3.16.4", - "forwardername": "test" + "language": "javascript", + "forwardername": "test", + "_dd.origin": "lambda" }, "metrics": { "_sample_rate": 1.0, @@ -529,17 +529,17 @@ "start": "1583425836123944000", "duration": "499751709", "meta": { - "span.kind": "client", - "account_id": "0", - "dns.hostname": "0.0.0.0", "forwarder_version": "3.16.4", + "account_id": "0", + "_dd.origin": "lambda", "forwarder_memorysize": "1536", - "functionname": "hello-dog-node-dev-hello12x", + "dns.address": "0.0.0.0", + "forwardername": "test", "aws_account": "0", + "dns.hostname": "0.0.0.0", "region": "us-east-1", - "_dd.origin": "lambda", - "dns.address": "0.0.0.0", - "forwardername": "test" + "functionname": "hello-dog-node-dev-hello12x", + "span.kind": "client" }, "metrics": { "_top_level": 1.0, @@ -557,22 +557,22 @@ "start": "1583425836623786500", "duration": "218750", "meta": { - "forwardername": "test", + "aws_account": "0", "forwarder_memorysize": "1536", - "dns.address": "169.254.79.2", "region": "us-east-1", - "dns.hostname": "169.254.79.2", - "functionname": "hello-dog-node-dev-hello12x", - "span.kind": "client", + "dns.address": "169.254.79.2", "_dd.origin": "lambda", - "aws_account": "0", + "forwarder_version": "3.16.4", "account_id": "0", - "forwarder_version": "3.16.4" + "functionname": "hello-dog-node-dev-hello12x", + "forwardername": "test", + "dns.hostname": "169.254.79.2", + "span.kind": "client" }, "metrics": { "_top_level": 1.0, - "_sample_rate": 1.0, - "_sampling_priority_v1": 2.0 + "_sampling_priority_v1": 2.0, + "_sample_rate": 1.0 } }, { @@ -585,22 +585,22 @@ "start": "1583425836164049000", "duration": "460493896", "meta": { - "account_id": "0", - "aws_account": "0", "dns.hostname": "www.google.com", - "_dd.origin": "lambda", - "forwardername": "test", - "forwarder_memorysize": "1536", - "forwarder_version": "3.16.4", "span.kind": "client", + "forwardername": "test", + "_dd.origin": "lambda", "region": "us-east-1", + "forwarder_version": "3.16.4", + "account_id": "0", + "functionname": "hello-dog-node-dev-hello12x", "dns.address": "172.217.15.68", - "functionname": "hello-dog-node-dev-hello12x" + "forwarder_memorysize": "1536", + "aws_account": "0" }, "metrics": { - "_top_level": 1.0, "_sample_rate": 1.0, - "_sampling_priority_v1": 2.0 + "_sampling_priority_v1": 2.0, + "_top_level": 1.0 } }, { @@ -613,29 +613,29 @@ "start": "1583425836163914000", "duration": "479066650", "meta": { - "region": "us-east-1", - "_dd.origin": "lambda", - "out.host": "www.google.com", - "functionname": "hello-dog-node-dev-hello12x", - "forwarder_memorysize": "1536", "out.port": "443", - "span.kind": "client", - "forwardername": "test", - "tcp.local.port": "37484", + "_dd.origin": "lambda", "tcp.remote.host": "www.google.com", - "tcp.family": "IPv4", - "tcp.local.address": "169.254.76.1", - "forwarder_version": "3.16.4", + "region": "us-east-1", + "forwarder_memorysize": "1536", "aws_account": "0", "tcp.remote.port": "443", - "account_id": "0" + "tcp.family": "IPv4", + "functionname": "hello-dog-node-dev-hello12x", + "account_id": "0", + "forwarder_version": "3.16.4", + "out.host": "www.google.com", + "tcp.local.port": "37484", + "forwardername": "test", + "span.kind": "client", + "tcp.local.address": "169.254.76.1" }, "metrics": { - "_sample_rate": 1.0, - "_top_level": 1.0, "_sampling_priority_v1": 2.0, "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-tcp": 18572754.0, + "_sample_rate": 1.0, "_sublayers.span_count": 2.0, + "_top_level": 1.0, "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-dns": 460493896.0 } }, @@ -649,28 +649,28 @@ "start": "1583425836124274200", "duration": "577401367", "meta": { - "forwarder_version": "3.16.4", - "forwarder_memorysize": "1536", - "region": "us-east-1", + "functionname": "hello-dog-node-dev-hello12x", "account_id": "0", + "forwardername": "test", + "forwarder_version": "3.16.4", "http.method": "GET", "aws_account": "0", - "span.kind": "client", + "region": "us-east-1", "http.url": "https://www.google.com/", - "_dd.origin": "lambda", - "forwardername": "test", - "functionname": "hello-dog-node-dev-hello12x", - "http.status_code": "200" + "http.status_code": "200", + "forwarder_memorysize": "1536", + "span.kind": "client", + "_dd.origin": "lambda" }, "metrics": { - "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-http-client": 98334717.0, - "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-tcp": 18572754.0, - "_sample_rate": 1.0, "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-dns": 460493896.0, "_sublayers.span_count": 3.0, - "_top_level": 1.0, + "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-http-client": 98334717.0, "_sublayers.duration.by_type.sublayer_type:http": 98334717.0, - "_sampling_priority_v1": 2.0 + "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-tcp": 18572754.0, + "_sampling_priority_v1": 2.0, + "_sample_rate": 1.0, + "_top_level": 1.0 }, "type": "http" }, @@ -684,30 +684,30 @@ "start": "1583425836123549200", "duration": "578297119", "meta": { - "request_id": "f08bb4c8-d6b2-4f05-ac17-af7e2ba005fb", "forwardername": "test", - "_dd.origin": "lambda", - "function_arn": "arn:aws:lambda:us-east-1:601427279990:function:hello-dog-node-dev-hello12x", - "forwarder_version": "3.16.4", "functionname": "hello-dog-node-dev-hello12x", - "resource_names": "hello-dog-node-dev-hello12x", "cold_start": "false", - "aws_account": "0", - "account_id": "0", - "forwarder_memorysize": "1536", + "resource_names": "hello-dog-node-dev-hello12x", + "_dd.origin": "lambda", "region": "us-east-1", - "language": "javascript" + "forwarder_version": "3.16.4", + "request_id": "f08bb4c8-d6b2-4f05-ac17-af7e2ba005fb", + "forwarder_memorysize": "1536", + "account_id": "0", + "aws_account": "0", + "language": "javascript", + "function_arn": "arn:aws:lambda:us-east-1:601427279990:function:hello-dog-node-dev-hello12x" }, "metrics": { - "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-dns": 327909657.0, "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-http-client": 78514817.0, "_top_level": 1.0, "_sublayers.span_count": 12.0, - "_sublayers.duration.by_type.sublayer_type:http": 78514817.0, - "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x": 153367391.0, "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-tcp": 18505254.0, "_sampling_priority_v1": 2.0, - "_sample_rate": 1.0 + "_sublayers.duration.by_type.sublayer_type:http": 78514817.0, + "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x": 153367391.0, + "_sample_rate": 1.0, + "_sublayers.duration.by_service.sublayer_service:hello-dog-node-dev-hello12x-dns": 327909657.0 } } ], @@ -728,6 +728,62 @@ "content-type": "application/json", "data": { "series": [ + { + "metric": "aws.dd_forwarder.incoming_events", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.logs_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.metrics_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.traces_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, { "metric": "aws.lambda.enhanced.invocations", "points": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot index ba2258f09..39e2e28e7 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot @@ -101,6 +101,48 @@ "content-type": "application/json", "data": { "series": [ + { + "metric": "aws.dd_forwarder.incoming_events", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.logs_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, + { + "metric": "aws.dd_forwarder.metrics_forwarded", + "points": "", + "type": "distribution", + "host": null, + "device": null, + "tags": [ + "forwardername:test", + "forwarder_memorysize:1536", + "forwarder_version:", + "event_type:awslogs" + ], + "interval": 10 + }, { "metric": "aws.lambda.enhanced.timeouts", "points": "",