Skip to content

Commit

Permalink
[chore] fix exhaustive lint for sentry exporter (#23896)
Browse files Browse the repository at this point in the history
**Description:** 
related  #23266

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
  • Loading branch information
fatsheep9146 authored Jul 5, 2023
1 parent bd8eae1 commit 93bb857
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,6 @@ issues:
- path: logzioexporter
linters:
- exhaustive
- path: sentryexporter
linters:
- exhaustive
- path: prometheusexporter
linters:
- exhaustive
Expand Down
11 changes: 11 additions & 0 deletions exporter/sentryexporter/sentry_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,13 @@ func generateSpanDescriptors(name string, attrs pcommon.Map, spanKind ptrace.Spa
opBuilder.WriteString(".client")
case ptrace.SpanKindServer:
opBuilder.WriteString(".server")
case ptrace.SpanKindUnspecified:
case ptrace.SpanKindInternal:
opBuilder.WriteString(".internal")
case ptrace.SpanKindProducer:
opBuilder.WriteString(".producer")
case ptrace.SpanKindConsumer:
opBuilder.WriteString(".consumer")
}

// Ex. description="GET /api/users/{user_id}".
Expand Down Expand Up @@ -376,6 +383,10 @@ func generateTagsFromAttributes(attrs pcommon.Map) map[string]string {
tags[key] = strconv.FormatFloat(attr.Double(), 'g', -1, 64)
case pcommon.ValueTypeInt:
tags[key] = strconv.FormatInt(attr.Int(), 10)
case pcommon.ValueTypeEmpty:
case pcommon.ValueTypeMap:
case pcommon.ValueTypeSlice:
case pcommon.ValueTypeBytes:
}
return true
})
Expand Down

0 comments on commit 93bb857

Please sign in to comment.