Closed RomanMinkin closed 2 years ago
Hi @RomanMinkin! This appears to be coming from the datadog agent, which would mean you're using the Datadog Lambda Extension, correct?
Is the environment variable DD_LOG_LEVEL
set? If so, what is it set to?
This appears intentional, but I don't think it should be shown for every invocation unless DD_LOG_LEVEL
is set.
Let me know!
@astuyve thank you for the fast reply!
Datadog-Extention
layer is used in the original Lambda FunctionDD_LOG_LEVEL
is set to info
warning
only appears on a function instance startup, not on each invocation. So as long as function instance stays warm there is only one warning message at the start.I'm not very familiar with how datadog-agent
works and just wandering what do I do wrong as I could not figure out what setting do I need to change to fix that warning message without changing log level?
@RomanMinkin Thanks! That's super helpful.
So the log line you're seeing is indeed coming from the datadog-agent
. You see it on startup because that's when the agent is initialized.
You're not doing anything wrong, it's just a warning and can be ignored. There are sane defaults set in the absence of the configuration file. Since DD_LOG_LEVEL
is INFO
, you could unset it entirely (or set it to something higher like ERROR
) to mute this message.
You don't have to fix anything - but if you're curious, the datadog.yaml
file is used to configure the agent to your liking. The most common example I see is obfuscating span tags, so you can remove sensitive data: https://docs.datadoghq.com/tracing/setup_overview/configure_data_security/?tab=http#replace-rules-for-tag-filtering
Please let me know if you are able to suppress this message by unsetting DD_LOG_LEVEL, or choosing a higher level - if so, we will close this issue. Thanks!
@astuyve setting DD_LOG_LEVEL
to error
does remove the warning message indeed. Thank you!
Just out of curiosity is there anything can be done to somehow create datadog.yaml
in the Datadog Lambda Extension so the warning would not sow up and we can use info
leve lat the same time?
@RomanMinkin Yup, even an empty one would work. You can just add it to the root level of your project.
@astuyve sorry I'm now to Datadog. Would it be too much to ask to point to how it can be done with serverless-plugin-datadog
configuration?
Oh - the plugin won't create it for you. You can just run touch datadog.yaml
to create an empty file in your project, then when you run severless deploy
, the Serverless Framework will automatically package it up and inject the empty file into your runtime. This will suppress the error (since the file exists, but contains no configuration). Then you can keep DD_LOG_LEVEL: INFO
and won't see the message.
@astuyve awesome, that is what I was looking for! Thank you again! Closing the issue.
Expected Behavior
No warning message appears should appear in the log
Actual Behavior
Following warning appears in the log on every Lambda Function invocation:
Steps to Reproduce the Problem
serverless-plugin-datadog
used by the lambda functionSpecifications
Stacktrace
No stack trace