diff --git a/docs/internal/internal-config.md b/docs/internal/internal-config.md
index 4260fed8d..5dc3483fb 100644
--- a/docs/internal/internal-config.md
+++ b/docs/internal/internal-config.md
@@ -13,15 +13,6 @@ These settings should be never used by the users.
| `SIGNALFX_CONVENTION` | Sets the semantic and trace id conventions for the tracer. Available values are: `Datadog` (64bit trace id), `OpenTelemetry` (128 bit trace id). | `OpenTelemetry` |
| `SIGNALFX_DUMP_ILREWRITE_ENABLED` | Allows the profiler to dump the IL original code and modification to the log. | `false` |
| `SIGNALFX_EXPORTER` | The exporter to be used. The Tracer uses it to encode and dispatch traces. Available values are: `DatadogAgent`, `Zipkin`. | `Zipkin` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_INTEGRATIONS` | Configuration key for a list of direct log submission integrations to enable. Only selected integrations are enabled for direct log submission. Supports multiple values separated with semi-colons. Valid values are `ILogger`, `Serilog`, `Log4Net`, `NLog` | `` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_HOST` | Configuration key for the name of the originating host for direct logs submission. | `` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_SOURCE` | Configuration key for the originating source for direct logs submission. | `csharp` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_TAGS` | Configuration key for a list of tags to be applied globally to all logs directly submitted. Supports multiple key key-value pairs which are comma-separated, and for which the key and value are colon-separated. For example Key1:Value1, Key2:Value2 | `` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_URL` | Configuration key for the url to send logs to. | `https://http-intake.logs.datadoghq.com:443` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL` | Configuration key for the minimum level logs should have to be sent to the intake. Should be one of `Verbose`,`Debug`,`Information`,`Warning`,`Error`,`Fatal` | `Information` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_MAX_BATCH_SIZE` | Configuration key for the maximum number of logs to send at one time | `1000` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_MAX_QUEUE_SIZE` | Configuration key for the maximum number of logs to hold in internal queue at any one time | `100000` |
-| `SIGNALFX_LOGS_DIRECT_SUBMISSION_BATCH_PERIOD_SECONDS` | Configuration key for the time in seconds to wait between checking for batches | `2` |
| `SIGNALFX_PROFILER_MEMORY_ENABLED` | Enable to activate memory profiling. | `false` |
| `SIGNALFX_PROFILER_MAX_MEMORY_SAMPLES_PER_MINUTE` | Configuratoin key for the maximum number of memory samples gathered per minute. | `200`
| `SIGNALFX_PROFILER_EXPORT_INTERVAL` | Profiling exporter interval in milliseconds. It defines how often the profiling data is sent to the collector. If the CPU profiling is enabled this value will automatically be set to match `SIGNALFX_PROFILER_CALL_STACK_INTERVAL`. | `10000` |
@@ -32,12 +23,6 @@ These settings should be never used by the users.
|-|-|-|
| `SIGNALFX_AGENT_HOST` | The Agent host where the tracer can send traces. | |
| `SIGNALFX_APM_RECEIVER_PORT` | The port for Trace Agent binding. | `8126` |
-| `SIGNALFX_CIVISIBILITY_AGENTLESS_ENABLED` | Enable to activate Agentless in CI Visibility. | `false` |
-| `SIGNALFX_CIVISIBILITY_AGENTLESS_URL` | Configuration key for setting the agentless url endpoint. | |
-| `SIGNALFX_CIVISIBILITY_CODE_COVERAGE_ENABLED` | Configuration key for enabling or disabling Code Coverage in CI Visibility. | `false` |
-| `SIGNALFX_CIVISIBILITY_CODE_COVERAGE_SNK_FILEPATH` | Configuration key for re-signing assemblies after the Code Coverage modification. | |
-| `SIGNALFX_CIVISIBILITY_ENABLED` | Enable to activate CI Visibility. | `false` |
-| `SIGNALFX_CIVISIBILITY_LOGS_ENABLED` | Enable to activate Logs direct submission. | `false` |
| `SIGNALFX_DOGSTATSD_ARGS` | Comma-separated list of arguments to be passed to the DogStatsD process. | |
| `SIGNALFX_DOGSTATSD_PATH` | The DogStatsD path for when a standalone instance needs to be started. | |
| `SIGNALFX_DOGSTATSD_PIPE_NAME` | The named pipe that DogStatsD binds to. | |
@@ -67,8 +52,6 @@ These settings should be never used by the users.
| `SIGNALFX_TRACE_TRANSPORT` | Overrides the transport to use for communicating with the trace agent. Available values are: `datagod-tcp`, `datadog-named-pipes`. | |
| `SIGNALFX_AAS_ENABLE_CUSTOM_TRACING` | Used to force the loader to start the tracer agent (in case automatic instrumentation is disabled). Used in contexts where the user cannot manage agent processes, such as Azure App Services. | |
| `SIGNALFX_AAS_ENABLE_CUSTOM_METRICS` | Used to force the loader to start dogstatsd (in case automatic instrumentation is disabled). Used in contexts where the user cannot manage agent processes, such as Azure App Services. | |
-| `SIGNALFX_INSTRUMENTATION_TELEMETRY_ENABLED` | Used to enable internal telemetry. | `false` |
-| `SIGNALFX_TRACE_TELEMETRY_URL` | Sets the telemetry URL where the tracer sends telemetry. | |
| `SIGNALFX_SITE` | Sets the default destination site. | |
| `SIGNALFX_LOG_LEVEL` | Sets the log level for serverless. | |
| `_SIGNALFX_EXTENSION_PATH` | Sets the lambda extension path. | |
diff --git a/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogExporter.cs b/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogExporter.cs
index eccde2eaa..7eefae01e 100644
--- a/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogExporter.cs
+++ b/tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogExporter.cs
@@ -29,18 +29,6 @@ public class DatadogExporter : IExporter
private static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor(typeof(DatadogExporter));
- static DatadogExporter()
- {
- try
- {
- Environment.SetEnvironmentVariable(Configuration.ConfigurationKeys.CIVisibility.Enabled, "1", EnvironmentVariableTarget.Process);
- }
- catch
- {
- // .
- }
- }
-
///
public string Name => nameof(DatadogExporter);
diff --git a/tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs b/tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs
index 00d4488f5..f984fe79f 100644
--- a/tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs
+++ b/tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs
@@ -107,7 +107,6 @@ public void Process()
}
else if (tracerTarget == TracerTarget.Net461)
{
- _logger.Debug($"Assembly: {FilePath}, is a net461 signed assembly, a .snk file is required ({Configuration.ConfigurationKeys.CIVisibility.CodeCoverageSnkFile} environment variable).");
return;
}
}
diff --git a/tracer/src/Datadog.Trace.MSBuild/DatadogLogger.cs b/tracer/src/Datadog.Trace.MSBuild/DatadogLogger.cs
index d9c69c3a5..1c0d26825 100644
--- a/tracer/src/Datadog.Trace.MSBuild/DatadogLogger.cs
+++ b/tracer/src/Datadog.Trace.MSBuild/DatadogLogger.cs
@@ -35,15 +35,6 @@ public class DatadogLogger : INodeLogger
static DatadogLogger()
{
- try
- {
- Environment.SetEnvironmentVariable(Configuration.ConfigurationKeys.CIVisibility.Enabled, "1", EnvironmentVariableTarget.Process);
- }
- catch
- {
- // .
- }
-
CIVisibility.Initialize();
}
diff --git a/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CICodeCoveragePayload.cs b/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CICodeCoveragePayload.cs
index 12f89eb17..62fb18ab6 100644
--- a/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CICodeCoveragePayload.cs
+++ b/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CICodeCoveragePayload.cs
@@ -21,16 +21,14 @@ public CICodeCoveragePayload(int maxItemsPerPayload = DefaultMaxItemsPerPayload,
if (!string.IsNullOrWhiteSpace(agentlessUrl))
{
var builder = new UriBuilder(agentlessUrl);
- builder.Path = "api/v2/citestcov";
Url = builder.Uri;
}
else
{
Url = new UriBuilder(
scheme: "https",
- host: "event-platform-intake." + CIVisibility.Settings.Site,
- port: 443,
- pathValue: "api/v2/citestcov").Uri;
+ host: CIVisibility.Settings.Site,
+ portNumber: 443).Uri;
}
// We call reset here to add the dummy event
diff --git a/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CITestCyclePayload.cs b/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CITestCyclePayload.cs
index a61334c9f..28c18fac7 100644
--- a/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CITestCyclePayload.cs
+++ b/tracer/src/Datadog.Trace/Ci/Agent/Payloads/CITestCyclePayload.cs
@@ -18,16 +18,15 @@ public CITestCyclePayload(IFormatterResolver formatterResolver = null)
if (!string.IsNullOrWhiteSpace(agentlessUrl))
{
var builder = new UriBuilder(agentlessUrl);
- builder.Path = "api/v2/citestcycle";
Url = builder.Uri;
}
else
{
Url = new UriBuilder(
scheme: "https",
- host: "citestcycle-intake." + CIVisibility.Settings.Site,
- port: 443,
- pathValue: "api/v2/citestcycle").Uri;
+ host: CIVisibility.Settings.Site,
+ portNumber: 443)
+ .Uri;
}
}
diff --git a/tracer/src/Datadog.Trace/Ci/CIVisibility.cs b/tracer/src/Datadog.Trace/Ci/CIVisibility.cs
index cf756f68f..78fd94cb1 100644
--- a/tracer/src/Datadog.Trace/Ci/CIVisibility.cs
+++ b/tracer/src/Datadog.Trace/Ci/CIVisibility.cs
@@ -13,7 +13,6 @@
using Datadog.Trace.Configuration;
using Datadog.Trace.Logging;
using Datadog.Trace.Pdb;
-using Datadog.Trace.Util;
namespace Datadog.Trace.Ci
{
@@ -21,10 +20,9 @@ internal class CIVisibility
{
private static readonly CIVisibilitySettings _settings = CIVisibilitySettings.FromDefaultSources();
private static int _firstInitialization = 1;
- private static Lazy _enabledLazy = new Lazy(() => InternalEnabled(), true);
internal static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor(typeof(CIVisibility));
- public static bool Enabled => _enabledLazy.Value;
+ public static bool Enabled => false;
public static bool IsRunning => Interlocked.CompareExchange(ref _firstInitialization, 0, 0) == 0;
@@ -156,60 +154,5 @@ private static async Task ShutdownAsync()
await InternalFlushAsync().ConfigureAwait(false);
MethodSymbolResolver.Instance.Clear();
}
-
- private static bool InternalEnabled()
- {
- var processName = ProcessHelpers.GetCurrentProcessName() ?? string.Empty;
-
- // By configuration
- if (_settings.Enabled)
- {
- // When is enabled by configuration we only enable it to the testhost child process if the process name is dotnet.
- if (processName.Equals("dotnet", StringComparison.OrdinalIgnoreCase) && Environment.CommandLine.IndexOf("testhost.dll", StringComparison.OrdinalIgnoreCase) == -1)
- {
- Log.Information("CI Visibility disabled because the process name is 'dotnet' but the commandline doesn't contain 'testhost.dll': {cmdline}", Environment.CommandLine);
- return false;
- }
-
- Log.Information("CI Visibility Enabled by Configuration");
- return true;
- }
-
- // Try to autodetect based in the domain name.
- var domainName = AppDomain.CurrentDomain.FriendlyName ?? string.Empty;
- if (domainName.StartsWith("testhost", StringComparison.Ordinal) ||
- domainName.StartsWith("vstest", StringComparison.Ordinal) ||
- domainName.StartsWith("xunit", StringComparison.Ordinal) ||
- domainName.StartsWith("nunit", StringComparison.Ordinal) ||
- domainName.StartsWith("MSBuild", StringComparison.Ordinal))
- {
- Log.Information("CI Visibility Enabled by Domain name whitelist");
- PropagateCiVisibilityEnvironmentVariable();
- return true;
- }
-
- // Try to autodetect based in the process name.
- if (processName.StartsWith("testhost.", StringComparison.Ordinal))
- {
- Log.Information("CI Visibility Enabled by Process name whitelist");
- PropagateCiVisibilityEnvironmentVariable();
- return true;
- }
-
- return false;
-
- static void PropagateCiVisibilityEnvironmentVariable()
- {
- try
- {
- // Set the configuration key to propagate the configuration to child processes.
- Environment.SetEnvironmentVariable(ConfigurationKeys.CIVisibility.Enabled, "1", EnvironmentVariableTarget.Process);
- }
- catch
- {
- // .
- }
- }
- }
}
}
diff --git a/tracer/src/Datadog.Trace/Ci/Configuration/CIVisibilitySettings.cs b/tracer/src/Datadog.Trace/Ci/Configuration/CIVisibilitySettings.cs
index db7fd10a4..8280ab4d0 100644
--- a/tracer/src/Datadog.Trace/Ci/Configuration/CIVisibilitySettings.cs
+++ b/tracer/src/Datadog.Trace/Ci/Configuration/CIVisibilitySettings.cs
@@ -3,6 +3,8 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
//
+// Modified by Splunk Inc.
+
using System;
using Datadog.Trace.Configuration;
@@ -12,32 +14,24 @@ internal class CIVisibilitySettings
{
public CIVisibilitySettings(IConfigurationSource source)
{
- Enabled = source?.GetBool(ConfigurationKeys.CIVisibility.Enabled) ?? false;
- Agentless = source?.GetBool(ConfigurationKeys.CIVisibility.AgentlessEnabled) ?? false;
- Logs = source?.GetBool(ConfigurationKeys.CIVisibility.Logs) ?? false;
- ApiKey = source?.GetString(ConfigurationKeys.ApiKey);
- Site = source?.GetString(ConfigurationKeys.Site) ?? "datadoghq.com";
- AgentlessUrl = source?.GetString(ConfigurationKeys.CIVisibility.AgentlessUrl);
+ Enabled = false;
+ Agentless = false;
+ Logs = false;
+ ApiKey = string.Empty;
+ Site = "localhost";
+ AgentlessUrl = string.Empty;
// By default intake payloads has a 5MB limit
MaximumAgentlessPayloadSize = 5 * 1024 * 1024;
- ProxyHttps = source?.GetString(ConfigurationKeys.Proxy.ProxyHttps);
- var proxyNoProxy = source?.GetString(ConfigurationKeys.Proxy.ProxyNoProxy) ?? string.Empty;
- ProxyNoProxy = proxyNoProxy.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
+ ProxyHttps = string.Empty;
+ ProxyNoProxy = Array.Empty();
TracerSettings = new TracerSettings(source);
- if (Logs)
- {
- // Enable the direct log submission
- TracerSettings.LogSubmissionSettings.DirectLogSubmissionEnabledIntegrations.Add("XUnit");
- TracerSettings.LogSubmissionSettings.DirectLogSubmissionBatchPeriod = TimeSpan.FromSeconds(1);
- }
-
// Code coverage
- CodeCoverageEnabled = source?.GetBool(ConfigurationKeys.CIVisibility.CodeCoverage) ?? false;
- CodeCoverageSnkFilePath = source?.GetString(ConfigurationKeys.CIVisibility.CodeCoverageSnkFile);
+ CodeCoverageEnabled = false;
+ CodeCoverageSnkFilePath = string.Empty;
}
///
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/DirectSubmissionLogger.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/DirectSubmissionLogger.cs
deleted file mode 100644
index 517f9ecc5..000000000
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/DirectSubmissionLogger.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
-// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
-//
-#nullable enable
-
-using System;
-using Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.ILogger.DirectSubmission.Formatting;
-using Datadog.Trace.DuckTyping;
-using Datadog.Trace.Logging.DirectSubmission;
-using Datadog.Trace.Logging.DirectSubmission.Formatting;
-using Datadog.Trace.Logging.DirectSubmission.Sink;
-
-namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.ILogger.DirectSubmission
-{
- ///
- /// An implementation of ILogger for use with direct log submission
- ///
- internal class DirectSubmissionLogger
- {
- private readonly string _name;
- private readonly IExternalScopeProvider? _scopeProvider;
- private readonly IDatadogSink _sink;
- private readonly LogFormatter? _logFormatter;
- private readonly int _minimumLogLevel;
-
- internal DirectSubmissionLogger(
- string name,
- IExternalScopeProvider? scopeProvider,
- IDatadogSink sink,
- LogFormatter? logFormatter,
- DirectSubmissionLogLevel minimumLogLevel)
- {
- _name = name;
- _scopeProvider = scopeProvider;
- _sink = sink;
- _logFormatter = logFormatter;
- _minimumLogLevel = (int)minimumLogLevel;
- }
-
- ///
- /// Writes a log entry.
- ///
- /// Entry will be written on this level.
- /// Id of the event.
- /// The entry to be written. Can be also an object.
- /// The exception related to this entry.
- /// Function to create a message of the and .
- /// The type of the object to be written.
- [DuckReverseMethod(ParameterTypeNames = new[] { "Microsoft.Extensions.Logging.LogLevel", "Microsoft.Extensions.Logging.EventId", "TState", "System.Exception", "Func`3" })]
- public void Log(int logLevel, object eventId, TState state, Exception exception, Func formatter)
- {
- if (!IsEnabled(logLevel))
- {
- return;
- }
-
- // We render the event to a string immediately as we need to capture the properties
- // This is more expensive from a CPU perspective, but saves having to persist the
- // properties to a dictionary and rendering later
-
- var logEntry = new LogEntry(
- DateTime.UtcNow,
- logLevel,
- _name,
- eventId.GetHashCode(),
- state,
- exception,
- formatter,
- _scopeProvider);
- var logFormatter = _logFormatter ?? TracerManager.Instance.DirectLogSubmission.Formatter;
- var serializedLog = LoggerLogFormatter.FormatLogEvent(logFormatter, logEntry);
-
- var log = new LoggerDatadogLogEvent(serializedLog);
-
- _sink.EnqueueLog(log);
- }
-
- ///
- /// Checks if the given is enabled.
- ///
- /// Level to be checked.
- /// true if enabled.
- [DuckReverseMethod(ParameterTypeNames = new[] { "Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.Abstractions" })]
- public bool IsEnabled(int logLevel) => logLevel >= _minimumLogLevel;
-
- ///
- /// Begins a logical operation scope.
- ///
- /// The identifier for the scope.
- /// The type of the state to begin scope for.
- /// An that ends the logical operation scope on dispose.
- [DuckReverseMethod(ParameterTypeNames = new[] { "TState" })]
- public IDisposable BeginScope(TState state) => _scopeProvider?.Push(state) ?? NullDisposable.Instance;
-
- private class NullDisposable : IDisposable
- {
- public static readonly NullDisposable Instance = new();
-
- public void Dispose()
- {
- }
- }
- }
-}
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/DirectSubmissionLoggerProvider.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/DirectSubmissionLoggerProvider.cs
deleted file mode 100644
index 99f33129f..000000000
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/DirectSubmissionLoggerProvider.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
-// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
-//
-#nullable enable
-
-using System;
-using System.Collections.Concurrent;
-using System.ComponentModel;
-using Datadog.Trace.DuckTyping;
-using Datadog.Trace.Logging.DirectSubmission;
-using Datadog.Trace.Logging.DirectSubmission.Formatting;
-using Datadog.Trace.Logging.DirectSubmission.Sink;
-
-namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.ILogger.DirectSubmission
-{
- ///
- /// Duck type for ILoggerProvider
- ///
- internal class DirectSubmissionLoggerProvider
- {
- private readonly Func _createLoggerFunc;
- private readonly ConcurrentDictionary _loggers = new();
- private readonly IDatadogSink _sink;
- private readonly LogFormatter? _formatter;
- private readonly DirectSubmissionLogLevel _minimumLogLevel;
- private IExternalScopeProvider? _scopeProvider;
-
- internal DirectSubmissionLoggerProvider(IDatadogSink sink, DirectSubmissionLogLevel minimumLogLevel)
- : this(sink, formatter: null, minimumLogLevel)
- {
- }
-
- // used for testing
- internal DirectSubmissionLoggerProvider(
- IDatadogSink sink,
- LogFormatter? formatter,
- DirectSubmissionLogLevel minimumLogLevel)
- {
- _sink = sink;
- _formatter = formatter;
- _minimumLogLevel = minimumLogLevel;
- _createLoggerFunc = CreateLoggerImplementation;
- }
-
- ///
- /// Creates a new instance.
- ///
- /// The category name for messages produced by the logger.
- /// The instance of that was created.
- [DuckReverseMethod]
- public DirectSubmissionLogger CreateLogger(string categoryName)
- {
- return _loggers.GetOrAdd(categoryName, _createLoggerFunc);
- }
-
- private DirectSubmissionLogger CreateLoggerImplementation(string name)
- {
- return new DirectSubmissionLogger(name, _scopeProvider, _sink, _formatter, _minimumLogLevel);
- }
-
- ///
- [DuckReverseMethod]
- public void Dispose()
- {
- }
-
- ///
- /// Method for ISupportExternalScope
- ///
- /// The provider of scope data
- [DuckReverseMethod(ParameterTypeNames = new[] { "Microsoft.Extensions.Logging.IExternalScopeProvider, Microsoft.Extensions.Logging.Abstractions" })]
- public void SetScopeProvider(IExternalScopeProvider scopeProvider)
- {
- _scopeProvider = scopeProvider;
- }
- }
-}
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/Formatting/LogEntry.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/Formatting/LogEntry.cs
deleted file mode 100644
index d83232799..000000000
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/Formatting/LogEntry.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
-// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
-//
-#nullable enable
-
-using System;
-
-namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.ILogger.DirectSubmission.Formatting
-{
- internal readonly struct LogEntry
- {
- public LogEntry(
- DateTime timestamp,
- int logLevel,
- string category,
- int eventId,
- TState state,
- Exception? exception,
- Func formatter,
- IExternalScopeProvider? scopeProvider)
- {
- Timestamp = timestamp;
- LogLevel = logLevel;
- Category = category;
- EventId = eventId;
- State = state;
- Exception = exception;
- Formatter = formatter;
- ScopeProvider = scopeProvider;
- }
-
- public DateTime Timestamp { get; }
-
- public int LogLevel { get; }
-
- public string Category { get; }
-
- public int EventId { get; }
-
- public TState State { get; }
-
- public Exception? Exception { get; }
-
- public Func Formatter { get; }
-
- public IExternalScopeProvider? ScopeProvider { get; }
- }
-}
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/Formatting/LoggerLogFormatter.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/Formatting/LoggerLogFormatter.cs
deleted file mode 100644
index 568ac3765..000000000
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Logging/ILogger/DirectSubmission/Formatting/LoggerLogFormatter.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-//
-// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
-// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
-//
-#nullable enable
-
-using System.Collections.Generic;
-using Datadog.Trace.Logging.DirectSubmission;
-using Datadog.Trace.Logging.DirectSubmission.Formatting;
-using Datadog.Trace.Util;
-using Datadog.Trace.Vendors.Newtonsoft.Json;
-
-namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.ILogger.DirectSubmission.Formatting
-{
- internal class LoggerLogFormatter
- {
- private const string MessageTemplateKey = "{OriginalFormat}";
-
- public static string? FormatLogEvent(LogFormatter logFormatter, in LogEntry logEntry)
- {
- var message = logEntry.Formatter(logEntry.State, logEntry.Exception);
- if (logEntry.Exception == null && message == null)
- {
- // No message! weird...
- return null;
- }
-
- var sb = StringBuilderCache.Acquire(StringBuilderCache.MaxBuilderSize);
-
- logFormatter.FormatLog(
- sb,
- logEntry,
- logEntry.Timestamp,
- message,
- logEntry.EventId == 0 ? null : logEntry.EventId,
- GetLogLevelString(logEntry.LogLevel),
- logEntry.Exception,
- (JsonTextWriter w, in LogEntry e) => RenderProperties(w, e));
-
- return StringBuilderCache.GetStringAndRelease(sb);
- }
-
- private static LogPropertyRenderingDetails RenderProperties(JsonTextWriter writer, in LogEntry logEntry)
- {
- var haveSource = false;
- var haveService = false;
- var haveHost = false;
- var haveTags = false;
- var haveVersion = false;
- var haveEnv = false;
- string? messageTemplate = null;
-
- if (logEntry.State is { } state)
- {
- if (state is IEnumerable> stateProperties)
- {
- foreach (var item in stateProperties)
- {
- // we don't need to write the message template
- // (but should we) ?
- var key = item.Key;
- if (key != MessageTemplateKey)
- {
- haveSource |= LogFormatter.IsSourceProperty(key);
- haveService |= LogFormatter.IsServiceProperty(key);
- haveHost |= LogFormatter.IsHostProperty(key);
- haveTags |= LogFormatter.IsTagsProperty(key);
- haveEnv |= LogFormatter.IsEnvProperty(key);
- haveVersion |= LogFormatter.IsVersionProperty(key);
-
- LogFormatter.WritePropertyName(writer, key);
- LogFormatter.WriteValue(writer, item.Value);
- }
- else if (item.Value is string stringValue)
- {
- messageTemplate = stringValue;
- }
- }
- }
- else
- {
- writer.WritePropertyName("@s", escape: false);
- LogFormatter.WriteValue(writer, state);
- }
- }
-
- if (logEntry.ScopeProvider is { } scopeProvider)
- {
- var writerWrapper = new WriterWrapper(writer);
- scopeProvider.ForEachScope(
- (scope, wrapper) =>
- {
- // Add dictionary scopes to a properties object
- // Theoretically we _should_ handle "duplicate" values, where the property has been added as state,
- // And then we try and add it again, but the backend seems to handle this ok
- if (scope is IEnumerable> scopeItems)
- {
- foreach (var item in scopeItems)
- {
- var key = item.Key;
- haveSource |= LogFormatter.IsSourceProperty(key);
- haveService |= LogFormatter.IsServiceProperty(key);
- haveHost |= LogFormatter.IsHostProperty(key);
- haveTags |= LogFormatter.IsTagsProperty(key);
- haveEnv |= LogFormatter.IsEnvProperty(key);
- haveVersion |= LogFormatter.IsVersionProperty(key);
-
- LogFormatter.WritePropertyName(writer, key);
- LogFormatter.WriteValue(wrapper.Writer, item.Value);
- }
- }
- else
- {
- wrapper.Values.Add(scope); // add to list for inclusion in scope array
- }
- },
- writerWrapper);
-
- if (writerWrapper.HasValues && writerWrapper.Values.Count > 0)
- {
- writer.WritePropertyName("Scopes", escape: false);
- writer.WriteStartArray();
-
- var values = writerWrapper.Values;
- for (var i = 0; i < values.Count; i++)
- {
- LogFormatter.WriteValue(writer, values[i]);
- }
-
- writer.WriteEndArray();
- }
- }
-
- return new LogPropertyRenderingDetails(
- hasRenderedSource: haveSource,
- hasRenderedService: haveService,
- hasRenderedHost: haveHost,
- hasRenderedTags: haveTags,
- hasRenderedEnv: haveEnv,
- hasRenderedVersion: haveVersion,
- messageTemplate: messageTemplate);
- }
-
- private static string GetLogLevelString(int logLevel) =>
- logLevel switch
- {
- 0 => DirectSubmissionLogLevelExtensions.Verbose, // Trace
- 1 => DirectSubmissionLogLevelExtensions.Debug,
- 2 => DirectSubmissionLogLevelExtensions.Information,
- 3 => DirectSubmissionLogLevelExtensions.Warning,
- 4 => DirectSubmissionLogLevelExtensions.Error,
- 5 => DirectSubmissionLogLevelExtensions.Fatal, // Critical
- _ => DirectSubmissionLogLevelExtensions.Unknown,
- };
-
- private class WriterWrapper
- {
- private List