Skip to content

Commit

Permalink
[exporter/elasticsearch] Enable errcheck in elasticsearch exporter (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#14945)

* remove warning

Signed-off-by: jian.tan <[email protected]>

* fix TestExporter_PushTraceRecord Flaky test

* fix lint for es exporter

Signed-off-by: Jared Tan <[email protected]>

* revert

Signed-off-by: Jared Tan <[email protected]>

* fix lint

Signed-off-by: Jared Tan <[email protected]>

Signed-off-by: jian.tan <[email protected]>
Signed-off-by: Jared Tan <[email protected]>
  • Loading branch information
JaredTan95 committed Oct 14, 2022
1 parent 697cac1 commit fa927a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion exporter/elasticsearchexporter/logs_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

// Package elasticsearchexporter contains an opentelemetry-collector exporter
// for Elasticsearch.
// nolint:errcheck
package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter"

import (
Expand Down
1 change: 0 additions & 1 deletion exporter/elasticsearchexporter/trace_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

// Package elasticsearchexporter contains an opentelemetry-collector exporter
// for Elasticsearch.
// nolint:errcheck
package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter"

import (
Expand Down
5 changes: 3 additions & 2 deletions exporter/elasticsearchexporter/traces_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// nolint:errcheck
package elasticsearchexporter

import (
Expand Down Expand Up @@ -313,7 +312,9 @@ func newTestTracesExporter(t *testing.T, url string, fns ...func(*Config)) *elas
exporter, err := newTracesExporter(zaptest.NewLogger(t), withTestTracesExporterConfig(fns...)(url))
require.NoError(t, err)

t.Cleanup(func() { exporter.Shutdown(context.TODO()) })
t.Cleanup(func() {
require.NoError(t, exporter.Shutdown(context.TODO()))
})
return exporter
}

Expand Down

0 comments on commit fa927a6

Please sign in to comment.