Skip to content

Conversation

@waterdrag0n
Copy link

@waterdrag0n waterdrag0n commented Nov 25, 2025

Fix filter not working when adding via + button in Explore logs

#1369 introduced OTel attribute support but broke existing Map/JSON type filter logic.

Problem 1: Empty mapKey

When clicking + button on a log field from a Map type column (e.g., LogAttributes as labels) in Explore, the filter was created with an empty key.

  • Expected: labels['key'] = 'value'
  • Actual: labels = 'value'

Fix: Fallback to columnName when mapKey is not set by OTel prefix parsing.

Problem 2: Empty columnType

When OTel mode is enabled, columns were set without type information, causing Map columns to be incorrectly treated as JSON.

  • Expected: labels['key'] = 'value' (Map syntax)
  • Actual: labels.`key` = 'value' (JSON syntax)

Fix: Fetch column type from table schema in useOtelColumns.

Related: #1369 (comment)

@waterdrag0n waterdrag0n changed the title Fix filter not working when adding via + button in Explore logs Fix filter for Map type LogLabels Nov 25, 2025
@adamyeats adamyeats moved this from Incoming to Needs Review in Partner Datasources Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

1 participant