Skip to content

Commit

Permalink
[WIP] print structured metadata for log line
Browse files Browse the repository at this point in the history
  • Loading branch information
agebhar1 committed Feb 4, 2024
1 parent 3d49c3c commit 9e56ef9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/chunks-inspect/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func parseLokiChunk(chunkHeader *ChunkHeader, r io.Reader, from, through time.Ti
for iter.Next() {
e := iter.Entry()
fmt.Println(e.Timestamp.UTC(), " ", e.Line)
for _, meta := range e.StructuredMetadata {
fmt.Println("\t", meta.Name, "=", meta.Value)
}
}
}

Expand Down

0 comments on commit 9e56ef9

Please sign in to comment.