internal class LogInstrumentations()

in src/Elastic.OpenTelemetry.Core/Configuration/Instrumentations/LogInstrumentation.cs [15:34]


internal class LogInstrumentations(IEnumerable<LogInstrumentation> instrumentations) : HashSet<LogInstrumentation>(instrumentations)
{
	/// <summary>
	/// All available <see cref="LogInstrumentation"/> libraries.
	/// </summary>
	public static readonly LogInstrumentations All = new([.. LogInstrumentationExtensions.GetValues()]);

	/// <inheritdoc cref="object.ToString"/>
	public override string ToString()
	{
		if (Count == 0)
			return "None";
		if (Count == All.Count)
			return "All";
		if (All.Count - Count < All.Count)
			return $"All Except: {string.Join(", ", All.Except(this).Select(i => i.ToStringFast()))}";

		return string.Join(", ", this.Select(i => i.ToStringFast()));
	}
}