-
Notifications
You must be signed in to change notification settings - Fork 48
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
Use fixed port in the logsever #71
Comments
@luben Thanks for the heads up. Is this behavior documented anywhere? Also, are there any guidelines for port numbers to avoid conflicts with other extensions? |
Hi, sorry I missed the question. You can use any port != 9001. It's documented in https://docs.aws.amazon.com/lambda/latest/dg/runtimes-logs-api.html#runtimes-logs-api-dest Though this may cause conflict with other extensions. May be try some static port and if the bind fails fall-back to random. Unfortunately this behaviour around guarantees is not documented. |
Static port added in #77. |
newrelic-lambda-extension/lambda/logserver/logserver.go
Line 156 in fcdd844
If log server starts listening on random port, and Lambda sandbox (function and extensions) is restarted, it can lose logs from the previous invocation or the log server could receive duplicate logs. Using a stable port in the same sandbox will guarantee exactly-once delivery of the logs. It also will reduce the memory utilization in the sandbox.
The text was updated successfully, but these errors were encountered: