Skip to content

Commit

Permalink
fix: correct a typo, mertrics->metrics (open-telemetry#30288)
Browse files Browse the repository at this point in the history
corrects a typo and changes `mertricExportNativeClientFeatureGate` to
`metricExportNativeClientFeatureGate`
  • Loading branch information
nstott authored and cparkins committed Jan 10, 2024
1 parent 8614f3f commit 8cf7568
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exporter/datadogexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry"
)

var mertricExportNativeClientFeatureGate = featuregate.GlobalRegistry().MustRegister(
var metricExportNativeClientFeatureGate = featuregate.GlobalRegistry().MustRegister(
"exporter.datadogexporter.metricexportnativeclient",
featuregate.StageBeta,
featuregate.WithRegisterDescription("When enabled, metric export in datadogexporter uses native Datadog client APIs instead of Zorkian APIs."),
Expand All @@ -46,17 +46,17 @@ var noAPMStatsFeatureGate = featuregate.GlobalRegistry().MustRegister(

// isMetricExportV2Enabled returns true if metric export in datadogexporter uses native Datadog client APIs, false if it uses Zorkian APIs
func isMetricExportV2Enabled() bool {
return mertricExportNativeClientFeatureGate.IsEnabled()
return metricExportNativeClientFeatureGate.IsEnabled()
}

// enableNativeMetricExport switches metric export to call native Datadog APIs instead of Zorkian APIs.
func enableNativeMetricExport() error {
return featuregate.GlobalRegistry().Set(mertricExportNativeClientFeatureGate.ID(), true)
return featuregate.GlobalRegistry().Set(metricExportNativeClientFeatureGate.ID(), true)
}

// enableZorkianMetricExport switches metric export to call Zorkian APIs instead of native Datadog APIs.
func enableZorkianMetricExport() error {
return featuregate.GlobalRegistry().Set(mertricExportNativeClientFeatureGate.ID(), false)
return featuregate.GlobalRegistry().Set(metricExportNativeClientFeatureGate.ID(), false)
}

const metadataReporterPeriod = 30 * time.Minute
Expand Down

0 comments on commit 8cf7568

Please sign in to comment.