2 types derived from OtlpExporterAnnotation
Aspire.Hosting.JavaScript (1)
DenoOtlpExporterAnnotation.cs (1)
8internal sealed class DenoOtlpExporterAnnotation : OtlpExporterAnnotation, IReadOnlyDictionary<string, string>
Aspire.Hosting.TestUtilities (1)
Utils\OtlpExporterActivationTestExtensions.cs (1)
34: OtlpExporterAnnotation, IReadOnlyDictionary<string, string>
3 instantiations of OtlpExporterAnnotation
Aspire.Hosting (3)
OtlpConfigurationExtensions.cs (3)
36resource.Annotations.Add(new OtlpExporterAnnotation()); 55resource.Annotations.Add(new OtlpExporterAnnotation { RequiredProtocol = protocol }); 78builder.Resource.Annotations.Add(new OtlpExporterAnnotation { RequiredProtocol = protocol });
26 references to OtlpExporterAnnotation
Aspire.Hosting (5)
ApplicationModel\EnvironmentVariablesConfigurationGatherer.cs (1)
30var keepServiceInstanceId = executionContext.IsRunMode && resource.HasAnnotationOfType<OtlpExporterAnnotation>();
Dcp\ContainerCreator.cs (1)
339if (resource.TryGetAnnotationsOfType<OtlpExporterAnnotation>(out _))
OtlpConfigurationExtensions.cs (3)
105var otlpExporterAnnotation = GetEffectiveOtlpExporterAnnotation(resource); 215private static OtlpExporterAnnotation? GetEffectiveOtlpExporterAnnotation(IResource resource) 216=> resource.Annotations.OfType<OtlpExporterAnnotation>().LastOrDefault();
Aspire.Hosting.Azure.Tests (1)
AzureCosmosDBExtensionsTests.cs (1)
579Assert.NotEmpty(cosmos.Resource.Annotations.OfType<OtlpExporterAnnotation>());
Aspire.Hosting.Docker (3)
DockerComposeEnvironmentResource.cs (3)
391var otlpExporter = GetEffectiveOtlpExporterAnnotation(resource); 430private static OtlpExporterAnnotation? GetEffectiveOtlpExporterAnnotation(IResource resource) 431=> resource.Annotations.OfType<OtlpExporterAnnotation>().LastOrDefault();
Aspire.Hosting.JavaScript (3)
JavaScriptHostingExtensions.cs (3)
1129var exporter = builder.Resource.Annotations.OfType<OtlpExporterAnnotation>().Last(); 1536if (!builder.Resource.Annotations.OfType<OtlpExporterAnnotation>().Any())
Aspire.Hosting.JavaScript.Tests (4)
AddDenoAppTests.cs (4)
45var exporter = Assert.Single(denoApp.Resource.Annotations.OfType<OtlpExporterAnnotation>()); 331var exporter = Assert.Single(app.Resource.Annotations.OfType<OtlpExporterAnnotation>());
Aspire.Hosting.Kubernetes (3)
KubernetesEnvironmentResource.cs (3)
563var otlpExporter = GetEffectiveOtlpExporterAnnotation(resource); 601private static OtlpExporterAnnotation? GetEffectiveOtlpExporterAnnotation(IResource resource) 602=> resource.Annotations.OfType<OtlpExporterAnnotation>().LastOrDefault();
Aspire.Hosting.Tests (5)
ProjectResourceTests.cs (1)
244Assert.Equal(expectedOtlpExporter, resource.Annotations.OfType<OtlpExporterAnnotation>().Any());
WithOtlpExporterTests.cs (2)
99var annotation = Assert.Single(container.Resource.Annotations.OfType<OtlpExporterAnnotation>());
WithTerminalTests.cs (2)
364Assert.Single(host.Annotations.OfType<OtlpExporterAnnotation>()); 419Assert.Empty(host.Annotations.OfType<OtlpExporterAnnotation>());
Aspire.Hosting.TestUtilities (2)
Utils\OtlpExporterActivationTestExtensions.cs (2)
14if (!builder.Resource.TryGetLastAnnotation<OtlpExporterAnnotation>(out var exporter))