From 1245ded2ed8b362f353918c63df174ffe489bb11 Mon Sep 17 00:00:00 2001 From: Amanda Tarafa Mas Date: Mon, 5 Jul 2021 12:47:46 +0100 Subject: [PATCH] fix: Fully qualifies all alternative types/members for obsolete ones. Fixes #6672 --- .../Logging/LoggingTest.cs | 2 +- .../Logging/GoogleLoggerProvider.cs | 4 ++-- .../Logging/GoogleTraceProvider.cs | 2 +- .../Logging/IExternalTraceProvider.cs | 2 +- .../Google.Cloud.Diagnostics.Common/Trace/ManagedTracer.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore.IntegrationTests/Logging/LoggingTest.cs b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore.IntegrationTests/Logging/LoggingTest.cs index 015375996b86..75bceb827ba8 100644 --- a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore.IntegrationTests/Logging/LoggingTest.cs +++ b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore.IntegrationTests/Logging/LoggingTest.cs @@ -1181,7 +1181,7 @@ public void Invoke(Dictionary 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 labels) diff --git a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleLoggerProvider.cs b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleLoggerProvider.cs index 7a9ff4a46d9d..a0ea915c9f92 100644 --- a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleLoggerProvider.cs +++ b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleLoggerProvider.cs @@ -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> ObsoleteLabelsGetter => (serviceProvider, labels) => { @@ -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 ObsoleteTraceContextGetter => (serviceProvider, logEntry, traceTarget) => { diff --git a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleTraceProvider.cs b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleTraceProvider.cs index d2b536d56d0a..9e9ac822ef83 100644 --- a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleTraceProvider.cs +++ b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/GoogleTraceProvider.cs @@ -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. /// - [Obsolete("Use CloudTraceExtensions.TryAddGoogleTraceContextProvider instead.")] + [Obsolete("Use Google.Cloud.Diagnostics.AspNetCore.CloudTraceExtension.TryAddGoogleTraceContextProvider instead.")] public class GoogleTraceProvider : IExternalTraceProvider { /// diff --git a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/IExternalTraceProvider.cs b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/IExternalTraceProvider.cs index 223d720f6b64..0348ebf409d9 100644 --- a/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/IExternalTraceProvider.cs +++ b/apis/Google.Cloud.Diagnostics.AspNetCore/Google.Cloud.Diagnostics.AspNetCore/Logging/IExternalTraceProvider.cs @@ -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. /// - [Obsolete("Inject an Common.ITraceContextInstead.")] + [Obsolete("Inject a Google.Cloud.Diagnostics.Common.ITraceContext instead.")] public interface IExternalTraceProvider { /// diff --git a/apis/Google.Cloud.Diagnostics.Common/Google.Cloud.Diagnostics.Common/Trace/ManagedTracer.cs b/apis/Google.Cloud.Diagnostics.Common/Google.Cloud.Diagnostics.Common/Trace/ManagedTracer.cs index 8c1520a4c215..cd2edc5a2fe3 100644 --- a/apis/Google.Cloud.Diagnostics.Common/Google.Cloud.Diagnostics.Common/Trace/ManagedTracer.cs +++ b/apis/Google.Cloud.Diagnostics.Common/Google.Cloud.Diagnostics.Common/Trace/ManagedTracer.cs @@ -50,7 +50,7 @@ public static IConsumer CreateConsumer(TraceServiceClient client, Tr /// instead. The function returned by /// will accept any as input and not just . /// - [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 CreateTracerFactory(string projectId, IConsumer consumer, TraceOptions options) => CreateFactory(projectId, consumer, options);