Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Include send-data missing headers and organize telemetry config variables #3055
Include send-data missing headers and organize telemetry config variables #3055
Changes from 5 commits
fba92b1
72bd2fc
e78956d
6feb16d
fd744c3
fcfef2f
a0d86a8
ced1feb
3efca0a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Why is this no longer enabled by default? How will we know if there is an issue?
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.
Also, using a different term here could be confusing. Why "diagnostic" instead of "debug" like what is used elsewhere?
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.
At the moment
DD_TELEMETRY_LOG_COLLECTION_ENABLED
is the property which enables log collection of traces with WARN or ERROR level. It is only used by iast.And
DD_TELEMETRY_DIAGNOSTIC_LOG_COLLECTION_ENABLED
enables log collection of traces with DEBUG or INFO level. It is disabled by default. And really it doesn't have any effect yet as iast is not collecting that kind of traces.There are more details here
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.
This differs a lot from our current approach. Why not use
DEBUG
andLOG_LEVEL
to be consistent? We'll probably want to normalize all of this properly across the library later on too.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 will discuss this with my team
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.
Ok, we've decided to remove it until we are interested in collecting DEBUG or INFO traces.
But
DD_TELEMETRY_DIAGNOSTIC_LOG_COLLECTION_ENABLED
has other implications besides changing the log level. Iftrue
: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 super weird, and I agree with roch :/
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 has been removed from our implementation but I suppose java and other teams are using it.
wdyt @uurien @rochdev?
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.
Yeah let's make sure it makes sense before implementing it.
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.
Why was this moved? It doesn't seem to support programmatic config or be used anywhere else.
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 moved it to group all the telemetry properties reading in one place.
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.
How could this be missing? These are 2 process-level information that should always be available.
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 guess they are added by the agent, so there is no need to add them in the tracer.
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'm not sure :S, let me check it again.
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.
No, they are not added by the agent.
And they are mandatory headers according to the spec
I know the application data is included among the request data but it seems that the headers help to identify the request even if the backend fails to parse the request payload. For example to identify a particular library version and language, sending requests that cannot be parsed.
So it is useful for the backend that the tracer includes them.
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's fine if they're needed, but in which case would the condition be false? There would always be an
application
, and this it seems that this would always be true, so why theif
?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.
Because
sendData
method doesn't guarantee thatapplication
will always have a value andgetHeaders
method accesses someapplication
properties.I felt safer with the
if
.Removed