Code review changes for #1043 #1208
Open
+778
−332
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.
Builds on changes in #1043
There were some large structural/organization changes to be made to the original PR, so I decided to solve these in this PR so we can get it merged asap.
Example of events showing:

Major Changes
1. Changed the "events" and "links" prefix from a
SelectedColumn
to astring
The string prefix is used within the SQL generator. This makes the editor components work as intended, since a string prefix isn't a column. This also gets rid of that helper function, as well as the
ColumnHint
definitions.OTel defaults have been updated/set for this field
2. Added "Use Flatten Nested" option to config + editor
There's a discussion on how to handle
flatten_nested=1
. While the updated query is said to work with both versions, I was unable to get it to run. The default OTel table (along with the default ClickHouse setting) usesflatten_nested=0
. This means we have distinct columns such asEvents.Attributes
andEvents.TraceId
instead of justEvents
as a tuple.Instead of trying to work with both with one query, I added a setting that toggles the generated logic for this expression.
The updated query is also split on to multiple lines in the code since it was veeeeery long.
OTel defaults have been updated/set for this field
3. Refactored TracesConfig component tests
There was a ridiculous amount of duplicated code in here (I think I wrote it 👀), but I simplified it so that it now reuses a function for applying default props.
Other changes
VerticalGroup
andHorizontalGroup
toStack
Switch
component now hasdisabled
prop (required for disablingflatten_nested
checkbox if otel is enabled)InstrumentationLibrary
Name
andVersion
columns as optional in the tooltip. These columns don't exist on our default OTel trace table, but they're available if users want them.Let me know if anything else should be changed, or if you have any questions. Thanks!