Skip to content
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

Add handler as an input option #648

Closed
emhagman opened this issue Oct 5, 2020 · 2 comments
Closed

Add handler as an input option #648

emhagman opened this issue Oct 5, 2020 · 2 comments

Comments

@emhagman
Copy link
Contributor

emhagman commented Oct 5, 2020

Is it possible to add / does there already exist a way to set a custom handler via the Serverless component?

We are trying to setup https://docs.datadoghq.com/serverless/installation/nodejs/?tab=custom for our metrics and not being able to set a handler is preventing us from tracing our functions.

Essentially we'd like to use set the handler to node_modules/datadog-lambda-js/dist/handler.handler and then set the default-handler to the environment variable DD_LAMBDA_HANDLER like in the documentation in order to hook into the function.

Another example would be setting up Sentry: https://docs.sentry.io/platforms/node/guides/aws-lambda/ It seems like it would be impossible to use any 3rd party tools without something like this.

EDIT: Having looked at the code now, I am just curious if we could override https://github.com/serverless-nextjs/serverless-next.js/blob/master/packages/serverless-components/nextjs-component/src/component.ts#L373 via inputs ?

@emhagman emhagman changed the title Add customHandler as an input option Add handler as an input option Oct 5, 2020
@dphang dphang closed this as completed Oct 22, 2020
@luismanuel001
Copy link

@emhagman I'm currently in the middle of this same scenario, trying o integrate DD with this, could you by any chance share a sample of your setup?

@laertesousa
Copy link

@emhagman Also trying to integrate with DD and having no luck. Could you share an example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants