Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hosting] Revert obsoletion of OpenTelemetryBuilder #5571

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Extensions.Hosting/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Reverted obsoletion of `OpenTelemetryBuilder`.
([#5571](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5571))

## 1.8.1

Released 2024-Apr-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace OpenTelemetry;
/// Contains methods for configuring the OpenTelemetry SDK inside an <see
/// cref="IServiceCollection"/>.
/// </summary>
[Obsolete("Use IOpenTelemetryBuilder instead this class will be removed in a future version.")]
public sealed class OpenTelemetryBuilder : IOpenTelemetryBuilder
{
internal OpenTelemetryBuilder(IServiceCollection services)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ public static class OpenTelemetryServicesExtensions
/// <param name="services"><see cref="IServiceCollection"/>.</param>
/// <returns>The supplied <see cref="OpenTelemetryBuilder"/> for chaining
/// calls.</returns>
#pragma warning disable CS0618 // Type or member is obsolete
// Note: OpenTelemetryBuilder is obsolete because users should target
// IOpenTelemetryBuilder for extensions but this method is valid and
// expected to be called to obtain a root builder.
public static OpenTelemetryBuilder AddOpenTelemetry(this IServiceCollection services)
#pragma warning restore CS0618 // Type or member is obsolete
{
Guard.ThrowIfNull(services);

Expand Down