Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yotamloe committed Nov 17, 2024
1 parent 0f190bd commit 85927ef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 28 deletions.
2 changes: 1 addition & 1 deletion exporter/logzioexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ package logzioexporter // import "github.com/open-telemetry/opentelemetry-collec

import (
"errors"
"go.uber.org/zap"

"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/config/configopaque"
"go.opentelemetry.io/collector/config/configretry"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.uber.org/zap"
)

// Config contains Logz.io specific configuration such as Account TracesToken, Region, etc.
Expand Down
12 changes: 6 additions & 6 deletions exporter/logzioexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ import (
"encoding/json"
"errors"
"fmt"
"go.opentelemetry.io/collector/config/configopaque"
"go.opentelemetry.io/collector/pdata/plog/plogotlp"
"go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp"
"go.uber.org/zap"
"google.golang.org/grpc/codes"
st "google.golang.org/grpc/status"
"io"
"net/http"
"regexp"
Expand All @@ -25,12 +19,18 @@ import (
"github.com/jaegertracing/jaeger/model"
"github.com/jaegertracing/jaeger/pkg/cache"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configopaque"
"go.opentelemetry.io/collector/consumer/consumererror"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.opentelemetry.io/collector/pdata/plog"
"go.opentelemetry.io/collector/pdata/plog/plogotlp"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp"
"go.uber.org/zap"
"google.golang.org/genproto/googleapis/rpc/status"
"google.golang.org/grpc/codes"
st "google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger"
Expand Down
29 changes: 8 additions & 21 deletions exporter/logzioexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ import (
"encoding/json"
"errors"
"fmt"
"go.opentelemetry.io/collector/pdata/plog/plogotlp"
"go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp"
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"
"google.golang.org/genproto/googleapis/rpc/status"
"google.golang.org/grpc/codes"
"google.golang.org/protobuf/proto"
"io"
"net/http"
"net/http/httptest"
Expand All @@ -32,9 +25,16 @@ import (
"go.opentelemetry.io/collector/exporter/exportertest"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/plog"
"go.opentelemetry.io/collector/pdata/plog/plogotlp"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp"
"go.opentelemetry.io/collector/pdata/testdata"
conventions "go.opentelemetry.io/collector/semconv/v1.27.0"
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"
"google.golang.org/genproto/googleapis/rpc/status"
"google.golang.org/grpc/codes"
"google.golang.org/protobuf/proto"
)

const (
Expand Down Expand Up @@ -71,19 +71,6 @@ func fillLogOne(log plog.LogRecord) {
attNestedMap.PutDouble("number", 499)
}

func fillLogTwo(log plog.LogRecord) {
log.SetTimestamp(TestLogTimestamp)
log.SetDroppedAttributesCount(1)
log.SetSeverityNumber(plog.SeverityNumberInfo)
log.SetSeverityText("Info")
attrs := log.Attributes()
attrs.PutStr("customer", "acme")
attrs.PutDouble("number", 64)
attrs.PutBool("bool", true)
attrs.PutStr("env", "dev")
log.Body().SetStr("something happened")
}

func fillLogNoTimestamp(log plog.LogRecord) {
log.SetDroppedAttributesCount(1)
log.SetSeverityNumber(plog.SeverityNumberInfo)
Expand Down Expand Up @@ -499,6 +486,6 @@ func TestReadResponseBody(t *testing.T) {

type errorReader struct{}

func (e *errorReader) Read(p []byte) (n int, err error) {
func (e *errorReader) Read(_ []byte) (n int, err error) {
return 0, errors.New("read error")
}

0 comments on commit 85927ef

Please sign in to comment.