public static void WithElasticDefaults()

in src/Elastic.OpenTelemetry.Core/Extensions/OpenTelemetryLoggerOptionsExtensions.cs [27:49]


	public static void WithElasticDefaults(this OpenTelemetryLoggerOptions options, ILogger logger)
	{
#if NET
		ArgumentNullException.ThrowIfNull(options);
		ArgumentNullException.ThrowIfNull(logger);
#else
		if (options is null)
			throw new ArgumentNullException(nameof(options));

		if (logger is null)
			throw new ArgumentNullException(nameof(logger));
#endif

		options.IncludeFormattedMessage = true;

		// IncludeScopes is disabled until we have a resolution to duplicate attributes
		// See:
		//   - https://github.com/open-telemetry/opentelemetry-dotnet/issues/4324
		//   - https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/39304
		// options.IncludeScopes = true;

		logger.LogConfiguredSignalProvider(nameof(Signals.Logs), nameof(OpenTelemetryLoggerOptions), "<n/a>");
	}