Skip to content

Commit

Permalink
Trace enrichment framework prep for net8.0 (#1401)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusclay authored Nov 14, 2023
1 parent c630117 commit ab6398b
Show file tree
Hide file tree
Showing 19 changed files with 138 additions and 114 deletions.
3 changes: 2 additions & 1 deletion examples/enrichment/Examples.Enrichment/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ public static void Main()
.AddSource("MyCompany.MyProduct.MyLibrary")

// Register an enricher class.
// Important: AddTraceEnricher() must be called before any exporeters.
// Important: AddTraceEnricher() must be called before any exporters.
.AddTraceEnricher<MyTraceEnricher>()

// Add Console exporter to see the output of this example.
.AddConsoleExporter()

.Build();

// Create an Activity and add some tags to it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
abstract OpenTelemetry.Extensions.Enrichment.BaseEnricher<T>.Enrich(in T enrichmentBag) -> void
Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions
OpenTelemetry.Extensions.Enrichment.BaseEnricher<T>
OpenTelemetry.Extensions.Enrichment.BaseEnricher<T>.BaseEnricher() -> void
OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions
abstract OpenTelemetry.Extensions.Enrichment.TraceEnricher.Enrich(in OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag bag) -> void
Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions
OpenTelemetry.Extensions.Enrichment.TraceEnricher
OpenTelemetry.Extensions.Enrichment.TraceEnricher.TraceEnricher() -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.Add(string! key, object? value) -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.TraceEnrichmentBag() -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.TraceEnrichmentBag(System.Diagnostics.Activity! activity) -> void
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher<T>(this OpenTelemetry.Trace.TracerProviderBuilder! builder) -> OpenTelemetry.Trace.TracerProviderBuilder!
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher<T>(this OpenTelemetry.Trace.TracerProviderBuilder! builder) -> OpenTelemetry.Trace.TracerProviderBuilder!
virtual OpenTelemetry.Extensions.Enrichment.TraceEnricher.EnrichOnActivityStart(in OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag bag) -> void
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
abstract OpenTelemetry.Extensions.Enrichment.BaseEnricher<T>.Enrich(in T enrichmentBag) -> void
Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions
OpenTelemetry.Extensions.Enrichment.BaseEnricher<T>
OpenTelemetry.Extensions.Enrichment.BaseEnricher<T>.BaseEnricher() -> void
OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions
abstract OpenTelemetry.Extensions.Enrichment.TraceEnricher.Enrich(in OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag bag) -> void
Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions
OpenTelemetry.Extensions.Enrichment.TraceEnricher
OpenTelemetry.Extensions.Enrichment.TraceEnricher.TraceEnricher() -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.Add(string! key, object? value) -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.TraceEnrichmentBag() -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.TraceEnrichmentBag(System.Diagnostics.Activity! activity) -> void
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.OpenTelemetryEnrichmentServiceCollectionExtensions.AddTraceEnricher<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.OpenTelemetryEnrichmentProviderBuilderExtensions.AddTraceEnricher<T>(this OpenTelemetry.Trace.TracerProviderBuilder! builder) -> OpenTelemetry.Trace.TracerProviderBuilder!
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher<T>(this OpenTelemetry.Trace.TracerProviderBuilder! builder) -> OpenTelemetry.Trace.TracerProviderBuilder!
virtual OpenTelemetry.Extensions.Enrichment.TraceEnricher.EnrichOnActivityStart(in OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag bag) -> void
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
abstract OpenTelemetry.Extensions.Enrichment.TraceEnricher.Enrich(in OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag bag) -> void
Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions
OpenTelemetry.Extensions.Enrichment.TraceEnricher
OpenTelemetry.Extensions.Enrichment.TraceEnricher.TraceEnricher() -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.Add(string! key, object? value) -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.TraceEnrichmentBag() -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag.TraceEnrichmentBag(System.Diagnostics.Activity! activity) -> void
OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static Microsoft.Extensions.DependencyInjection.TraceEnrichmentServiceCollectionExtensions.AddTraceEnricher<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, OpenTelemetry.Extensions.Enrichment.TraceEnricher! enricher) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Action<OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag>! enrichmentAction) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Func<System.IServiceProvider!, OpenTelemetry.Extensions.Enrichment.TraceEnricher!>! enricherImplementationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Extensions.Enrichment.TraceEnrichmentProviderBuilderExtensions.AddTraceEnricher<T>(this OpenTelemetry.Trace.TracerProviderBuilder! builder) -> OpenTelemetry.Trace.TracerProviderBuilder!
virtual OpenTelemetry.Extensions.Enrichment.TraceEnricher.EnrichOnActivityStart(in OpenTelemetry.Extensions.Enrichment.TraceEnrichmentBag bag) -> void
Loading

0 comments on commit ab6398b

Please sign in to comment.