Skip to content

Commit

Permalink
fix lint error due to deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jj22ee committed Nov 15, 2024
1 parent c683843 commit 9a5cac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func createMetricsExporter(ctx context.Context, params exporter.Settings, config
return nil, err
}

exporter, err := exporterhelper.NewMetricsExporter(
exporter, err := exporterhelper.NewMetrics(
ctx,
params,
config,
Expand Down
8 changes: 4 additions & 4 deletions exporter/awsemfexporter/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestCreateDefaultConfig(t *testing.T) {
assert.NotNil(t, cfg.(*Config).logger)
}

func TestCreateTracesExporter(t *testing.T) {
func TestCreateTraces(t *testing.T) {
cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml"))
require.NoError(t, err)
factory := NewFactory()
Expand All @@ -37,12 +37,12 @@ func TestCreateTracesExporter(t *testing.T) {
require.NoError(t, sub.Unmarshal(cfg))

ctx := context.Background()
exporter, err := factory.CreateTracesExporter(ctx, exportertest.NewNopSettings(), cfg)
exporter, err := factory.CreateTraces(ctx, exportertest.NewNopSettings(), cfg)
assert.Error(t, err)
assert.Nil(t, exporter)
}

func TestCreateMetricsExporter(t *testing.T) {
func TestCreateMetrics(t *testing.T) {
cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml"))
require.NoError(t, err)
factory := NewFactory()
Expand All @@ -53,7 +53,7 @@ func TestCreateMetricsExporter(t *testing.T) {
require.NoError(t, sub.Unmarshal(cfg))

ctx := context.Background()
exporter, err := factory.CreateMetricsExporter(ctx, exportertest.NewNopSettings(), cfg)
exporter, err := factory.CreateMetrics(ctx, exportertest.NewNopSettings(), cfg)
assert.NoError(t, err)
assert.NotNil(t, exporter)
}

0 comments on commit 9a5cac4

Please sign in to comment.