Skip to content

Conversation

@duncanista
Copy link
Contributor

@duncanista duncanista commented Jan 8, 2026

What does this PR do?

Updates how enhanced metrics are parsed in order to work with Lambda Managed Instances

Motivation

Failing to parse a report log from Lambda Managed Instances, causing other metrics to also not be sent

Encountered an error while trying to parse and submit enhanced metrics for log {'id': '39425407939120316110070836392653955405483598923294834689', 'timestamp': 1767896435215, 'message': '{"time":"2026-01-08T18:20:35.215Z","type":"platform.report","record":{"requestId":"4fe12301-721e-4428-b5b8-8cc01d87c1a9","metrics":{"durationMs":2.139},"spans":[{"name":"responseLatency","start":"2026-01-08T18:20:35.214Z","durationMs":0.621},{"name":"responseDuration","start":"2026-01-08T18:20:35.215Z","durationMs":0.061}],"status":"success"}}', 'aws': {'awslogs': {'logGroup': '/aws/lambda/lmi-dev-baseline-python314-1min-x86_64', 'logStream': '2026/01/08/lmi-dev-baseline-python314-1min-x86_64[$LATEST.PUBLISHED]b908c081675b44af9bb93b6610dcd370', 'owner': '425362996713'}, 'invoked_function_arn': 'arn:aws:lambda:us-east-1:425362996713:function:lmi-dev-dd-forwarder'}, 'lambda': {'arn': 'arn:aws:lambda:us-east-1:425362996713:function:lmi-dev-baseline-python314-1min-x86_64'}, 'ddsourcecategory': 'aws', 'ddtags': 'forwardername:lmi-dev-dd-forwarder,forwarder_version:5.1.1,dd_preserve_stack:true,aws_cloudformation_logical-id:lmidevbaselinepython3141minx8664logsd9310d2f,aws_cloudformation_stack-id:arn:aws:cloudformation:us-east-1:425362996713:stack/lmi-dev-baseline/628f0390-ecb9-11f0-83a3-0e124f123293,aws_cloudformation_stack-name:lmi-dev-baseline,env:none,aws_account:425362996713,aws_cloudformation_logical-id:lmidevbaselinepython3141minx8664ce8f6b40,aws_cloudformation_stack-id:arn:aws:cloudformation:us-east-1:425362996713:stack/lmi-dev-baseline/628f0390-ecb9-11f0-83a3-0e124f123293,aws_cloudformation_stack-name:lmi-dev-baseline,dd_preserve_stack:true,functionname:lmi-dev-baseline-python314-1min-x86_64,region:us-east-1,service:lmi-dev-baseline-python314-1min-x86_64', 'ddsource': 'lambda', 'service': 'lmi-dev-baseline-python314-1min-x86_64', 'host': 'arn:aws:lambda:us-east-1:425362996713:function:lmi-dev-baseline-python314-1min-x86_64'}: 'billedDurationMs'

SVLS-8273

Testing Guidelines

Added unit test

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

@duncanista duncanista requested a review from a team as a code owner January 8, 2026 18:50
@github-actions github-actions bot added the aws label Jan 8, 2026
@duncanista duncanista force-pushed the jordan.gonzalez/forwarder/fix-logs-from-managed-instances branch from 8c289a4 to c54278e Compare January 8, 2026 19:08
@duncanista duncanista merged commit 0861c5a into master Jan 9, 2026
11 checks passed
@duncanista duncanista deleted the jordan.gonzalez/forwarder/fix-logs-from-managed-instances branch January 9, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants