in src/Elastic.OpenTelemetry.Core/Configuration/Instrumentations/TraceInstrumentation.cs [15:34]
internal class TraceInstrumentations(IEnumerable<TraceInstrumentation> instrumentations) : HashSet<TraceInstrumentation>(instrumentations)
{
/// <summary>
/// All available <see cref="TraceInstrumentation"/> libraries.
/// </summary>
public static readonly TraceInstrumentations All = new([.. TraceInstrumentationExtensions.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()));
}
}