-
Notifications
You must be signed in to change notification settings - Fork 10
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
[crashtracker] RFC for structured log format #554
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #554 +/- ##
==========================================
+ Coverage 71.01% 71.03% +0.01%
==========================================
Files 287 287
Lines 42836 42836
==========================================
+ Hits 30421 30428 +7
+ Misses 12415 12408 -7
|
Boolean `false` if the crashreport is complete (i.e. contains all intended data), `true` if there is expected missing data. | ||
This can happen becasue the crashtracker is architected to stream data to an out of process receiver, allowing a partial crash report to be emitted even in the case where the crashtracker itself crashed during stack trace collection. | ||
This MUST be set to `true` if any required field is missing. | ||
- `metadata`: |
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.
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, should these (i.e. library_name
, library_version
, os_info
etc) even be part of the structured json, given that they are already defined in the instrumentation-telemetry API which we are using to upload the crash reports when the tracer is at fault? (see the application
and host
sections of the required top level json keys in the instrumentation-telemetry api spec).
Perhaps we should only include them inline in the actual json payload when we are sending the information to the customer org (when the customer app is at fault) and not to instrumentation-telemetry
?
This RFC establishes a standardized logging format for reporting this information. | ||
|
||
### Why structured json | ||
As a text-based format, json can be written to standard logging endpoints. |
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.
Would this crashtracker be included with our SDKs (/tracer libs)? Which source (ddsource param) would be used to ingest these logs?
We may want to have Logs teams take a look at this, to make sure attributes are put in the right place (for functionalities aside from Error Tracking, like getting the status, host tags, message ... to show up well)
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.
Good idea. Who on the logs team would be the best person to do that?
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 think you can try in #logs-core :)
BenchmarksComparisonBenchmark execution time: 2024-11-13 20:08:31 Comparing candidate commit 12aa4e1 in PR branch Found 4 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 2 unstable metrics. scenario:credit_card/is_card_number/37828224631000521389798
scenario:credit_card/is_card_number_no_luhn/37828224631000521389798
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
BaselineOmitted due to size. |
- `frames`: | ||
An array of `StackFrame`, described below | ||
|
||
#### StackFrame |
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'd like to request some data about the actual functions. Especially in C code there's information to be had "this variable was a null pointer - this looks like freed memory - probably valid address".
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.
You mean like the actual values of local variables on the stack?
As we start to look into symbolication, I realize that adding all the module information at each stackframe is really inefficient and makes the crash report much bigger than it should. Shall we move the modules to a separate section, and only put the module base address in the stackframe? |
What does this PR do?
Defines a structured log format for crash reports
Motivation
If we want to interoperate with other tools/services, we need an agreed on format.
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.