Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Yun-Ting committed Oct 8, 2021
1 parent cc568e1 commit dc84c7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/OpenTelemetry/Metrics/MeterProviderSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ internal MeterProviderSdk(
OpenTelemetrySdkEventSource.Log.MetricInstrumentIgnored(instrument.Name, instrument.Meter.Name, "Instrument belongs to a Meter not subscribed by the provider.", "Use AddMeter to add the Meter to the provider.");
return;
}

try
{
var metricName = instrument.Name;
Expand All @@ -224,9 +225,7 @@ internal MeterProviderSdk(
{
if (this.metricStreamNames.ContainsKey(metricName))
{
// TODO: Log that instrument is ignored
// as the resulting Metric name is conflicting
// with existing name.
OpenTelemetrySdkEventSource.Log.MetricInstrumentIgnored(metricName, instrument.Meter.Name, "Metric name conflicting with existing name.", "Either change the name of the instrument or change name using View.");
return;
}

Expand Down

0 comments on commit dc84c7d

Please sign in to comment.