-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support CDK Aspects #251
base: main
Are you sure you want to change the base?
Support CDK Aspects #251
Conversation
v2/src/datadog.ts
Outdated
constructor(private datadog: Datadog) {} | ||
|
||
visit(node: IConstruct): void { | ||
if (node.constructor.name === lambda.Function.name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this condition might not instrument lambda.SingletonFunction
, is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's a miss, good call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the interfaces differ, so LambdaFunction.name
might or might not work 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I seemed to run into.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM – thanks a lot for this PR, AJ! 🎉
holding off on merging this because apparently this issue still remains. |
What does this PR do?
Allows our construct to be imported and used as an Aspect, which makes it easier to instrument all functions in a stack without re-importing or re-declaring the Datadog construct.
Motivation
Testing Guidelines
Additional Notes
Types of Changes
Check all that apply