Skip to content

Commit

Permalink
Lifetime guidance for MeterProvider and TracerProvider (#2850)
Browse files Browse the repository at this point in the history
Co-authored-by: Cijo Thomas <[email protected]>
  • Loading branch information
alanwest and cijothomas authored Feb 3, 2022
1 parent d3afacc commit aca7efc
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/OpenTelemetry/Sdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,26 @@ public static void SetDefaultTextMapPropagator(TextMapPropagator textMapPropagat
}

/// <summary>
/// Creates MeterProviderBuilder which should be used to build MeterProvider.
/// Creates a <see cref="MeterProviderBuilder"/> which is used to build
/// a <see cref="MeterProvider"/>. In a typical application, a single
/// <see cref="MeterProvider"/> is created at application startup and disposed
/// at application shutdown. It is important to ensure that the provider is not
/// disposed too early.
/// </summary>
/// <returns>MeterProviderBuilder instance, which should be used to build MeterProvider.</returns>
/// <returns><see cref="MeterProviderBuilder"/> instance, which is used to build a <see cref="MeterProvider"/>.</returns>
public static MeterProviderBuilder CreateMeterProviderBuilder()
{
return new MeterProviderBuilderSdk();
}

/// <summary>
/// Creates TracerProviderBuilder which should be used to build
/// TracerProvider.
/// Creates a <see cref="TracerProviderBuilder"/> which is used to build
/// a <see cref="TracerProvider"/>. In a typical application, a single
/// <see cref="TracerProvider"/> is created at application startup and disposed
/// at application shutdown. It is important to ensure that the provider is not
/// disposed too early.
/// </summary>
/// <returns>TracerProviderBuilder instance, which should be used to build TracerProvider.</returns>
/// <returns><see cref="TracerProviderBuilder"/> instance, which is used to build a <see cref="TracerProvider"/>.</returns>
public static TracerProviderBuilder CreateTracerProviderBuilder()
{
return new TracerProviderBuilderSdk();
Expand Down

0 comments on commit aca7efc

Please sign in to comment.