Skip to content

Commit

Permalink
feat(structured-metadata-api): remove log
Browse files Browse the repository at this point in the history
  • Loading branch information
svennergr committed Jul 22, 2024
1 parent b5b1b63 commit f0d5f60
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/querier/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package querier
import (
"context"
"flag"
"fmt"
"net/http"
"sort"
"strconv"
Expand Down Expand Up @@ -1117,7 +1116,7 @@ func (q *SingleTenantQuerier) DetectedFields(ctx context.Context, req *logproto.
return nil, err
}

detectedFields := parseDetectedFields(ctx, req.FieldLimit, streams)
detectedFields := parseDetectedFields(req.FieldLimit, streams)

fields := make([]*logproto.DetectedField, len(detectedFields))
fieldCount := 0
Expand Down Expand Up @@ -1210,16 +1209,12 @@ func determineType(value string) logproto.DetectedFieldType {
return logproto.DetectedFieldString
}

func parseDetectedFields(ctx context.Context, limit uint32, streams logqlmodel.Streams) map[string]*parsedFields {
func parseDetectedFields(limit uint32, streams logqlmodel.Streams) map[string]*parsedFields {
detectedFields := make(map[string]*parsedFields, limit)
fieldCount := uint32(0)
emtpyparser := ""

for _, stream := range streams {
level.Debug(spanlogger.FromContext(ctx)).Log(
"detected_fields", "true",
"msg", fmt.Sprintf("looking for detected fields in stream %d with %d lines", stream.Hash, len(stream.Entries)))

for _, entry := range stream.Entries {
structuredMetadata := getStructuredMetadata(entry)
for k, vals := range structuredMetadata {
Expand Down

0 comments on commit f0d5f60

Please sign in to comment.