Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Conversation

@bgola-signalfx
Copy link
Contributor

Key changes:

  • updated SignalFx client and SignalFx tracing libs to the latest version
  • updated README.md with sample code demonstrating how to add extra tags to spans sent by the wrapper
  • updated README.md with recommended approach to metrics and events delivery

signalFxLambda.helper.sendCloudWatchEvent(event);
callback(null, 'Done');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was .then removed? Wouldn't this possibly result in the event being lost if the function stopped before the event was exported successfully?

// to transform & forward CloudWatch event:
await signalFxLambda.helper.sendCloudWatchEvent(event);
signalFxLambda.helper.sendCloudWatchEvent(event);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above. If we don't wait for the function to finish exporting, there is no guarantee the data will actually be reported as function may exit and execution may be stopped before the metrics lib has a chance to complete the export.


This way multiple send operations may run concurrently without blocking your lambda handler code.

You can still await any of those promises if your use case forces you to do so.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. This answers my questions above :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! :)

@bgola-signalfx bgola-signalfx merged commit 4a61ad0 into master Oct 27, 2020
@bgola-signalfx bgola-signalfx deleted the update-deps branch October 27, 2020 09:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants