Skip to content

Commit 3f5371b

Browse files
committed
Merge remote-tracking branch 'upstream/main' into repo-refactor-standard-release-process
2 parents 7dc7476 + 2035202 commit 3f5371b

File tree

39 files changed

+171
-66
lines changed

39 files changed

+171
-66
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
filters: |
2020
md: [ '**.md' ]
2121
build: ['build/**', '.github/**/*.yml', '!.github/workflows/package-*', '**/*.targets', '**/*.props']
22-
shared: ['src/Shared/**']
22+
shared: ['src/Shared/**', 'test/Shared/**']
23+
sharedtests: ['test/OpenTelemetry.Contrib.Shared.Tests/**']
2324
code: ['**.cs', '**.csproj', '.editorconfig']
2425
aot: ['src/OpenTelemetry.Extensions.Enrichment/**']
2526
aottestapp: ['test/OpenTelemetry.AotCompatibility.TestApp/**']
@@ -82,6 +83,7 @@ jobs:
8283
'!*/OpenTelemetry.SemanticConventions*/**',
8384
'!*/OpenTelemetry.Instrumentation.Wcf*/**',
8485
'!examples/wcf/**',
86+
'!*/OpenTelemetry.Contrib.Shared.Tests/**',
8587
'!**/*.md'
8688
]
8789
@@ -344,6 +346,17 @@ jobs:
344346
project-name: OpenTelemetry.Instrumentation.Wcf
345347
code-cov-name: Instrumentation.Wcf
346348

349+
build-test-sharedtests:
350+
needs: detect-changes
351+
if: |
352+
contains(needs.detect-changes.outputs.changes, 'sharedtests')
353+
|| contains(needs.detect-changes.outputs.changes, 'build')
354+
|| contains(needs.detect-changes.outputs.changes, 'shared')
355+
uses: ./.github/workflows/Component.BuildTest.yml
356+
with:
357+
project-name: OpenTelemetry.Contrib.Shared.Tests
358+
code-cov-name: Contrib.Shared.Tests
359+
347360
build-test-solution:
348361
needs: detect-changes
349362
if: |
@@ -373,6 +386,7 @@ jobs:
373386
$projects = Get-ChildItem `
374387
-Path test/*.Tests/*.csproj `
375388
-Exclude `
389+
OpenTelemetry.Contrib.Shared.Tests.csproj,
376390
OpenTelemetry.Exporter.Geneva.Tests.csproj,
377391
OpenTelemetry.Exporter.OneCollector.Tests.csproj,
378392
OpenTelemetry.Extensions.Tests.csproj,
@@ -486,6 +500,7 @@ jobs:
486500
build-test-sqlclient,
487501
build-test-wcf,
488502
build-test-solution,
503+
build-test-sharedtests,
489504
verify-aot-compat
490505
]
491506
if: always() && !cancelled() && !contains(needs.*.result, 'failure')
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.Parent.FullName)</RepoRoot>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<SolutionProjects Include="$(RepoRoot)\test\OpenTelemetry.Contrib.Shared.Tests\OpenTelemetry.Contrib.Shared.Tests.csproj" />
9+
<TestProjects Include="$(RepoRoot)\test\OpenTelemetry.Contrib.Shared.Tests\OpenTelemetry.Contrib.Shared.Tests.csproj" />
10+
</ItemGroup>
11+
12+
<Target Name="Build">
13+
<MSBuild Projects="@(SolutionProjects)" Targets="Build" ContinueOnError="ErrorAndStop" />
14+
</Target>
15+
16+
<Target Name="Restore">
17+
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
18+
</Target>
19+
20+
<Target Name="Pack">
21+
<MSBuild Projects="@(PackProjects)" Targets="Pack" ContinueOnError="ErrorAndStop" />
22+
</Target>
23+
24+
<Target Name="VSTest">
25+
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
26+
</Target>
27+
28+
</Project>

opentelemetry-dotnet-contrib.sln

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "grpc.core", "grpc.core", "{
104104
EndProject
105105
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples.GrpcCore.AspNetCore", "examples\grpc.core\Examples.GrpcCore.AspNetCore\Examples.GrpcCore.AspNetCore.csproj", "{F1591DEE-79C0-4161-85C2-1477B261D274}"
106106
EndProject
107-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Tests.Shared", "test\OpenTelemetry.Contrib.Tests.Shared\OpenTelemetry.Contrib.Tests.Shared.csproj", "{C33F2D9D-89A6-459C-9A51-79BA5A9EF194}"
108-
EndProject
109107
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Quartz", "src\OpenTelemetry.Instrumentation.Quartz\OpenTelemetry.Instrumentation.Quartz.csproj", "{2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}"
110108
EndProject
111109
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Quartz.Tests", "test\OpenTelemetry.Instrumentation.Quartz.Tests\OpenTelemetry.Instrumentation.Quartz.Tests.csproj", "{37564EE6-F0A4-4F40-BB13-0BBFAC7F7F28}"
@@ -239,6 +237,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{1FCC8E
239237
src\Shared\DiagnosticSourceListener.cs = src\Shared\DiagnosticSourceListener.cs
240238
src\Shared\DiagnosticSourceSubscriber.cs = src\Shared\DiagnosticSourceSubscriber.cs
241239
src\Shared\ExceptionExtensions.cs = src\Shared\ExceptionExtensions.cs
240+
src\Shared\GrpcStatusCanonicalCode.cs = src\Shared\GrpcStatusCanonicalCode.cs
241+
src\Shared\GrpcTagHelper.cs = src\Shared\GrpcTagHelper.cs
242242
src\Shared\Guard.cs = src\Shared\Guard.cs
243243
src\Shared\IServerCertificateValidationEventSource.cs = src\Shared\IServerCertificateValidationEventSource.cs
244244
src\Shared\IsExternalInit.cs = src\Shared\IsExternalInit.cs
@@ -347,6 +347,24 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp.AspNetCore", "test\
347347
EndProject
348348
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNetCore.Benchmark", "test\OpenTelemetry.Instrumentation.AspNetCore.Benchmark\OpenTelemetry.Instrumentation.AspNetCore.Benchmark.csproj", "{92CD1B60-74B8-4E6E-9E7F-83AC3C792980}"
349349
EndProject
350+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Shared.Tests", "test\OpenTelemetry.Contrib.Shared.Tests\OpenTelemetry.Contrib.Shared.Tests.csproj", "{B13394D6-D3D7-453E-B91A-24C199F41C5E}"
351+
EndProject
352+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{70CA77D4-5D7F-4D70-A6B5-8AAC07A8EA3C}"
353+
ProjectSection(SolutionItems) = preProject
354+
test\Shared\CustomTextMapPropagator.cs = test\Shared\CustomTextMapPropagator.cs
355+
test\Shared\EnabledOnDockerPlatformTheoryAttribute.cs = test\Shared\EnabledOnDockerPlatformTheoryAttribute.cs
356+
test\Shared\EventSourceTestHelper.cs = test\Shared\EventSourceTestHelper.cs
357+
test\Shared\InMemoryEventListener.cs = test\Shared\InMemoryEventListener.cs
358+
test\Shared\SkipUnlessEnvVarFoundFactAttribute.cs = test\Shared\SkipUnlessEnvVarFoundFactAttribute.cs
359+
test\Shared\SkipUnlessEnvVarFoundTheoryAttribute.cs = test\Shared\SkipUnlessEnvVarFoundTheoryAttribute.cs
360+
test\Shared\TestActivityExportProcessor.cs = test\Shared\TestActivityExportProcessor.cs
361+
test\Shared\TestActivityProcessor.cs = test\Shared\TestActivityProcessor.cs
362+
test\Shared\TestEventListener.cs = test\Shared\TestEventListener.cs
363+
test\Shared\TestHttpServer.cs = test\Shared\TestHttpServer.cs
364+
test\Shared\TestSampler.cs = test\Shared\TestSampler.cs
365+
test\Shared\TestTextMapPropagator.cs = test\Shared\TestTextMapPropagator.cs
366+
EndProjectSection
367+
EndProject
350368
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{45D29DAA-0DB9-4808-B879-1AECC37EF366}"
351369
ProjectSection(SolutionItems) = preProject
352370
build\scripts\add-labels.ps1 = build\scripts\add-labels.ps1
@@ -408,10 +426,6 @@ Global
408426
{F1591DEE-79C0-4161-85C2-1477B261D274}.Debug|Any CPU.Build.0 = Debug|Any CPU
409427
{F1591DEE-79C0-4161-85C2-1477B261D274}.Release|Any CPU.ActiveCfg = Release|Any CPU
410428
{F1591DEE-79C0-4161-85C2-1477B261D274}.Release|Any CPU.Build.0 = Release|Any CPU
411-
{C33F2D9D-89A6-459C-9A51-79BA5A9EF194}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
412-
{C33F2D9D-89A6-459C-9A51-79BA5A9EF194}.Debug|Any CPU.Build.0 = Debug|Any CPU
413-
{C33F2D9D-89A6-459C-9A51-79BA5A9EF194}.Release|Any CPU.ActiveCfg = Release|Any CPU
414-
{C33F2D9D-89A6-459C-9A51-79BA5A9EF194}.Release|Any CPU.Build.0 = Release|Any CPU
415429
{2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
416430
{2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
417431
{2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -760,6 +774,10 @@ Global
760774
{92CD1B60-74B8-4E6E-9E7F-83AC3C792980}.Debug|Any CPU.Build.0 = Debug|Any CPU
761775
{92CD1B60-74B8-4E6E-9E7F-83AC3C792980}.Release|Any CPU.ActiveCfg = Release|Any CPU
762776
{92CD1B60-74B8-4E6E-9E7F-83AC3C792980}.Release|Any CPU.Build.0 = Release|Any CPU
777+
{B13394D6-D3D7-453E-B91A-24C199F41C5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
778+
{B13394D6-D3D7-453E-B91A-24C199F41C5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
779+
{B13394D6-D3D7-453E-B91A-24C199F41C5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
780+
{B13394D6-D3D7-453E-B91A-24C199F41C5E}.Release|Any CPU.Build.0 = Release|Any CPU
763781
EndGlobalSection
764782
GlobalSection(SolutionProperties) = preSolution
765783
HideSolutionNode = FALSE
@@ -781,7 +799,6 @@ Global
781799
{76BAB24F-85DB-4FCE-89D0-EFB4185004C9} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
782800
{58D1DE55-B0A5-4BC4-AB37-09B1C7B26752} = {B75EE478-97F7-4E9F-9A5A-DB3D0988EDEA}
783801
{F1591DEE-79C0-4161-85C2-1477B261D274} = {58D1DE55-B0A5-4BC4-AB37-09B1C7B26752}
784-
{C33F2D9D-89A6-459C-9A51-79BA5A9EF194} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
785802
{2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63}
786803
{37564EE6-F0A4-4F40-BB13-0BBFAC7F7F28} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
787804
{8D11A34C-D0EF-4DE1-8230-32168E67044D} = {B75EE478-97F7-4E9F-9A5A-DB3D0988EDEA}
@@ -877,6 +894,8 @@ Global
877894
{917AEC46-816C-4E05-913E-F0F44C24C437} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
878895
{1E743561-B1D4-4100-B6AD-1FD25FA8659B} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
879896
{92CD1B60-74B8-4E6E-9E7F-83AC3C792980} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
897+
{B13394D6-D3D7-453E-B91A-24C199F41C5E} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
898+
{70CA77D4-5D7F-4D70-A6B5-8AAC07A8EA3C} = {2097345F-4DD3-477D-BC54-A922F9B2B402}
880899
{45D29DAA-0DB9-4808-B879-1AECC37EF366} = {824BD1DE-3FA8-4FE0-823A-FD365EAC78AF}
881900
EndGlobalSection
882901
GlobalSection(ExtensibilityGlobals) = postSolution

src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Unreleased
44

5+
## 1.8.0
6+
7+
Released 2024-May-15
8+
9+
* Update OpenTelemetry SDK version to `1.8.1`.
10+
([#1798](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1798))
11+
512
## 1.8.0-rc.2
613

714
Released 2024-May-13

src/OpenTelemetry.Exporter.Geneva/Common.GenevaExporter.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<OTelSdkVersion>1.8.0-rc.1</OTelSdkVersion>
3+
<OTelSdkVersion>1.8.1</OTelSdkVersion>
44
</PropertyGroup>
55

66
<PropertyGroup Condition="$(OTelSdkVersion.Contains('alpha')) OR $(OTelSdkVersion.Contains('beta')) OR $(OTelSdkVersion.Contains('rc'))">

src/OpenTelemetry.Exporter.Geneva/Internal/ExporterEventSource.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ internal sealed class ExporterEventSource : EventSource
1616
private const int EVENT_ID_METRIC = 3; // Failed to send Metric
1717
private const int EVENT_ID_ERROR = 4; // Other common exporter exceptions
1818
private const int EVENT_ID_OTLP_PROTOBUF_METRIC = 5; // Failed to serialize metric
19+
private const int EVENT_ID_COMPLETED_EXPORT = 6; // Completed export
1920

2021
[NonEvent]
2122
public void FailedToSendTraceData(Exception ex)
@@ -103,4 +104,10 @@ public void FailedToSerializeMetric(string metricName, string error)
103104
{
104105
this.WriteEvent(EVENT_ID_OTLP_PROTOBUF_METRIC, metricName, error);
105106
}
107+
108+
[Event(EVENT_ID_COMPLETED_EXPORT, Message = "'{0}' completed data export.", Level = EventLevel.Informational)]
109+
public void ExportCompleted(string exporterName)
110+
{
111+
this.WriteEvent(EVENT_ID_COMPLETED_EXPORT, exporterName);
112+
}
106113
}

src/OpenTelemetry.Exporter.Geneva/MsgPackExporter/MsgPackLogExporter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ public ExportResult Export(in Batch<LogRecord> batch)
133133
}
134134
}
135135

136+
ExporterEventSource.Log.ExportCompleted(nameof(MsgPackLogExporter));
137+
136138
return result;
137139
}
138140

src/OpenTelemetry.Exporter.Geneva/MsgPackExporter/MsgPackTraceExporter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ public ExportResult Export(in Batch<Activity> batch)
166166
}
167167
}
168168

169+
ExporterEventSource.Log.ExportCompleted(nameof(MsgPackTraceExporter));
170+
169171
return result;
170172
}
171173

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using OpenTelemetry.Trace;
66
using Xunit;
77

8-
namespace OpenTelemetry.Instrumentation.Grpc.Tests;
8+
namespace OpenTelemetry.Instrumentation.Tests;
99

1010
public class GrpcTagHelperTests
1111
{
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
5+
<TargetFrameworks>$(SupportedNetTargets)</TargetFrameworks>
6+
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);$(NetFrameworkMinimumSupportedVersion)</TargetFrameworks>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="OpenTelemetry.Api" Version="$(OpenTelemetryCoreLatestVersion)" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<Compile Include="$(RepoRoot)\src\Shared\ActivityHelperExtensions.cs" Link="Includes\ActivityHelperExtensions.cs" />
15+
<Compile Include="$(RepoRoot)\src\Shared\GrpcTagHelper.cs" Link="Includes\GrpcTagHelper.cs" />
16+
<Compile Include="$(RepoRoot)\src\Shared\GrpcStatusCanonicalCode.cs" Link="Includes\GrpcStatusCanonicalCode.cs" />
17+
<Compile Include="$(RepoRoot)\src\Shared\RequestDataHelper.cs" Link="Includes\RequestDataHelper.cs" />
18+
<Compile Include="$(RepoRoot)\src\Shared\SemanticConventions.cs" Link="Includes\SemanticConventions.cs" />
19+
</ItemGroup>
20+
21+
</Project>

0 commit comments

Comments
 (0)