Make sure default meter will also be collected (#689)

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
This commit is contained in:
Yiwen Wang 2020-05-21 13:18:44 +08:00 committed by GitHub
parent 9125da5626
commit 5ed0e452d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// <copyright file="MeterFactory.cs" company="OpenTelemetry Authors">
// <copyright file="MeterFactory.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@ -46,6 +46,7 @@ namespace OpenTelemetry.Metrics.Configuration
new CancellationTokenSource());
this.defaultMeter = new MeterSdk(string.Empty, this.metricProcessor);
this.meterRegistry.Add(new MeterRegistryKey(string.Empty, null), this.defaultMeter);
}
public static MeterFactory Create(Action<MeterBuilder> configure)