Skip to content

Commit

Permalink
fix: Fully qualifies all alternative types/members for obsolete ones.
Browse files Browse the repository at this point in the history
Fixes #6672
  • Loading branch information
amanda-tarafa authored and jskeet committed Jul 5, 2021
1 parent d59ff4b commit 1245ded
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ public void Invoke(Dictionary<string, string> labels)
}
}

[Obsolete("Added to test that we still support the obsolete ILogEntryLabelProvider.")]
[Obsolete("Added to test that we still support the obsolete Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider.")]
internal class BarLogEntryLabelProvider : ILogEntryLabelProvider
{
public void Invoke(Dictionary<string, string> labels)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static GoogleLoggerProvider Create(
// Adapter function to be used to get labels set with the obsolete AspNetCore*.ILogEntryLabelProvider.
// Will be used to pass these labels from AspNetCore*.GoogleLogger to Common.GoogleLogger because
// Common.GoogleLogger cannot have a dependecy on the obsolote interface.
[Obsolete("Has been added temporarily until we remove AspNetCore.ILogEntryLabelProvider")]
[Obsolete("Has been added temporarily until we remove Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider.")]
internal static Action<IServiceProvider, Dictionary<string, string>> ObsoleteLabelsGetter =>
(serviceProvider, labels) =>
{
Expand All @@ -86,7 +86,7 @@ public static GoogleLoggerProvider Create(
// Adapter function to be used to get trace context from the obsolete AspNetCore*.IExternalTraceProvider.
// Will be used to "pass" this context from AspNetCore*.GoogleLogger to Common.GoogleLogger because
// Common.GoogleLogger cannot have a dependecy on the obsolote interface.
[Obsolete("Has been added temporarily until we remove AspNetCore.ILogEntryLabelProvider")]
[Obsolete("Has been added temporarily until we remove Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider.")]
internal static Action<IServiceProvider, LogEntry, TraceTarget> ObsoleteTraceContextGetter =>
(serviceProvider, logEntry, traceTarget) =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace Google.Cloud.Diagnostics.AspNetCore
/// If the Tracing component is configured, log entries are automatically associated
/// to Google traces and spans.
/// </remarks>
[Obsolete("Use CloudTraceExtensions.TryAddGoogleTraceContextProvider instead.")]
[Obsolete("Use Google.Cloud.Diagnostics.AspNetCore.CloudTraceExtension.TryAddGoogleTraceContextProvider instead.")]
public class GoogleTraceProvider : IExternalTraceProvider
{
/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Google.Cloud.Diagnostics.AspNetCore
/// Implement this interface when traces are being generated by your environment
/// and sent to Google Cloud Tracing not via the Google.Cloud.Diagnostics library.
/// </summary>
[Obsolete("Inject an Common.ITraceContextInstead.")]
[Obsolete("Inject a Google.Cloud.Diagnostics.Common.ITraceContext instead.")]
public interface IExternalTraceProvider
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static IConsumer<TraceProto> CreateConsumer(TraceServiceClient client, Tr
/// instead. The function returned by <see cref="CreateFactory(string, IConsumer{TraceProto}, TraceOptions)"/>
/// will accept any <see cref="ITraceContext"/> as input and not just <see cref="TraceHeaderContext"/>.
/// </remarks>
[Obsolete("Please use ManagedTracer.CreateFactory instead which only differs in that the returned factory will accept any ITraceContext as input.")]
[Obsolete("Please use Google.Cloud.Diagnostics.Common.ManagedTracer.CreateFactory instead which only differs in that the returned factory will accept any ITraceContext as input.")]
public static Func<TraceHeaderContext, IManagedTracer> CreateTracerFactory(string projectId, IConsumer<TraceProto> consumer, TraceOptions options) =>
CreateFactory(projectId, consumer, options);

Expand Down

0 comments on commit 1245ded

Please sign in to comment.