-
Notifications
You must be signed in to change notification settings - Fork 435
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
proposal: Add WithLogStartup tracer startup option #861
Comments
That's really nice to hear 🙂 I will pass this message onto our team internally too! You can go ahead and make this change if you wish! |
Done! |
Hi, I am a bit lost here. On each lambda start, I am receiving
I believe this are StartupLogs and I can disable them. Here is my configuration:
And then I am using Xray in my lambdas - for a logger, I am using
Is there any option in such configuration to disable logs using WithLogStartup ? |
Thank you for an amazing library, it has helped me debug issues countless times and has been easy to set up and maintain.
When a tracer starts it prints some information to stdout by default. While this was great during development it isn't as useful to us in production so we'd like a way to suppress it. Luckily we can easily do that with the
DD_TRACE_STARTUP_LOGS
environment variable as seen here.However, we configure other aspects of the tracer using
tracer.StartOption
s and it would be great if we could suppress this log the same way. From my perhaps limited investigation, it appears thatgopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer.config.logStartup
is only set in that one location, so there might be room for atracer.WithLogStartup(bool)
start option, which is exactly what I'm proposing :)I went ahead and tried to implement it before I read CONTRIBUTING.md, so I'm including a possible solution here. But I should have read the doc first so I'm happy to throw away the tiny amount of work I put into it.
There are other ways to achieve the same result using start options; for example,
WithLogger
could be used with a custom logger. I'm more than happy to go with an already implemented solution, but it's hard to beat the clarity of a specializedStartOption
.The text was updated successfully, but these errors were encountered: