Skip to content

Commit

Permalink
Merge branch 'main' into fix/1562
Browse files Browse the repository at this point in the history
  • Loading branch information
joegoldman2 authored Oct 16, 2024
2 parents 5bd4cb4 + b8fe2cb commit 3a69654
Show file tree
Hide file tree
Showing 124 changed files with 1,807 additions and 355 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ body:
- type: input
attributes:
label: Runtime Version
description: What .NET runtime version did you use? (e.g. `net462`, `net48`, `netcoreapp3.1`, `net6.0` etc. You can find this information from the `*.csproj` file)
description: What .NET runtime version did you use? (e.g. `net462`, `net48`, `net8.0` etc. You can find this information from the `*.csproj` file)
validations:
required: true

Expand Down
91 changes: 82 additions & 9 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,48 @@ comment:

ignore:
- "**.md"
- "src/Shared" # copied from main OTel project and has code coverage there
- "test"
- "examples"
- "build"
- ".github"
- ".vscode"

flags:
unittests-Solution:
unittests-Exporter.Geneva:
carryforward: true
paths:
- src
- src/OpenTelemetry.Exporter.Geneva

unittests-Exporter.Geneva:
unittests-Exporter.InfluxDB:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.Geneva
- src/OpenTelemetry.Exporter.InfluxDB

unittests-Exporter.Instana:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.Instana

unittests-Exporter.OneCollector:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.OneCollector

unittests-Exporter.Stackdriver:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.Stackdriver

unittests-Extensions:
carryforward: true
paths:
- src/OpenTelemetry.Extensions

unittests-Extensions.Enrichment:
carryforward: true
paths:
- src/OpenTelemetry.Extensions.Enrichment

unittests-Instrumentation.AspNet:
carryforward: true
paths:
Expand All @@ -63,26 +77,59 @@ flags:
paths:
- src/OpenTelemetry.Instrumentation.AspNetCore

unittests-Instrumentation.AWS:
carryforward: true
paths:
- src/OpenTelemetry.Extensions.AWS
- src/OpenTelemetry.Instrumentation.AWS
- src/OpenTelemetry.Instrumentation.AWSLambda

# Note: No unit tests currently for Cassandra being run in CI.
#unittests-Instrumentation.Cassandra:
# carryforward: true
# paths:
# - src/OpenTelemetry.Instrumentation.Cassandra

unittests-Instrumentation.ConfluentKafka:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.ConfluentKafka

unittests-Instrumentation.ElasticsearchClient:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.ElasticsearchClient

unittests-Instrumentation.EntityFrameworkCore:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.EntityFrameworkCore

unittests-Instrumentation.EventCounters:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.EventCounters

unittests-Instrumentation.Http:
unittests-Instrumentation.GrpcCore:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Http
- src/OpenTelemetry.Instrumentation.GrpcCore

unittests-Instrumentation.GrpcNetClient:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.GrpcNetClient

unittests-Instrumentation.Hangfire:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Hangfire

unittests-Instrumentation.Http:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Http

unittests-Instrumentation.Owin:
carryforward: true
paths:
Expand All @@ -93,6 +140,11 @@ flags:
paths:
- src/OpenTelemetry.Instrumentation.Process

unittests-Instrumentation.Quartz:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Quartz

unittests-Instrumentation.Runtime:
carryforward: true
paths:
Expand All @@ -119,11 +171,21 @@ flags:
- src/OpenTelemetry.PersistentStorage.Abstractions
- src/OpenTelemetry.PersistentStorage.FileSystem

unittests-Resources.AWS:
carryforward: true
paths:
- src/OpenTelemetry.Resources.AWS

unittests-Resources.Azure:
carryforward: true
paths:
- src/OpenTelemetry.Resources.Azure

unittests-Resources.Container:
carryforward: true
paths:
- src/OpenTelemetry.Resources.Container

unittests-Resources.Gcp:
carryforward: true
paths:
Expand All @@ -149,7 +211,18 @@ flags:
paths:
- src/OpenTelemetry.Resources.ProcessRuntime

unittests-SemanticConventions:
unittests-Sampler.AWS:
carryforward: true
paths:
- src/OpenTelemetry.Sampler.AWS

# Note: No unit tests currently for SemanticConventions being run in CI.
#unittests-SemanticConventions:
# carryforward: true
# paths:
# - src/OpenTelemetry.SemanticConventions

unittests-Contrib.Shared.Tests:
carryforward: true
paths:
- src/OpenTelemetry.SemanticConventions
- src/Shared
2 changes: 2 additions & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ components:
src/OpenTelemetry.Instrumentation.AWS/:
- srprash
- ppittle
- muhammad-othman
src/OpenTelemetry.Instrumentation.AWSLambda/:
- rypdal
- Oberon00
Expand Down Expand Up @@ -131,6 +132,7 @@ components:
test/OpenTelemetry.Instrumentation.AWS.Tests/:
- srprash
- ppittle
- muhammad-othman
test/OpenTelemetry.Instrumentation.AWSLambda.Tests/:
- rypdal
- Oberon00
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/Component.BuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
project-name:
required: true
type: string
run-tests:
required: false
default: true
type: boolean
code-cov-name:
required: true
type: string
Expand All @@ -18,7 +22,7 @@ on:
required: false
type: string
tfm-list:
default: '[ "net462", "net6.0", "net8.0" ]'
default: '[ "net462", "net8.0" ]'
required: false
type: string

Expand Down Expand Up @@ -87,21 +91,23 @@ jobs:
run: dotnet build ${{ steps.resolve-project.outputs.project }} --configuration Release --no-restore

- name: dotnet test ${{ steps.resolve-project.outputs.title }}
if: ${{ inputs.run-tests }}
run: dotnet test ${{ steps.resolve-project.outputs.project }} --collect:"Code Coverage" --results-directory:TestResults --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed" -- RunConfiguration.DisableAppDomain=true

- name: dotnet pack ${{ steps.resolve-project.outputs.title }}
if: ${{ matrix.os == 'windows-latest' }}
run: dotnet pack ${{ steps.resolve-project.outputs.project }} --configuration Release --no-restore --no-build -p:EnablePackageValidation=true

- name: Install coverage tool
if: ${{ inputs.run-tests }}
run: dotnet tool install -g dotnet-coverage

- name: Merging test results
if: ${{ hashFiles('./TestResults/**/*.coverage') != '' }}
if: ${{ inputs.run-tests && hashFiles('./TestResults/**/*.coverage') != '' }}
run: dotnet-coverage merge -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/**/*.coverage

- name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
if: ${{ hashFiles('./TestResults/Cobertura.xml') != '' }}
if: ${{ inputs.run-tests && hashFiles('./TestResults/Cobertura.xml') != '' }}
uses: codecov/codecov-action@v4
continue-on-error: true # Note: Don't fail for upload failures
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-Exporter.OneCollector-Integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net8.0 ]
version: [ net462, net8.0 ]
exclude:
- os: ubuntu-latest
version: net462
Expand Down
46 changes: 12 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ jobs:
exporter-onecollector: ['*/OpenTelemetry.Exporter.OneCollector*/**', '!**/*.md']
exporter-stackdriver: ['*/OpenTelemetry.Exporter.Stackdriver*/**', '!**/*.md']
extensions: ['*/OpenTelemetry.Extensions/**', '*/OpenTelemetry.Extensions.Tests/**', '!**/*.md']
extensions-aws: ['*/OpenTelemetry.Extensions.AWS*/**', '!**/*.md']
extensions-enrichment: ['*/OpenTelemetry.Extensions.Enrichment*/**', '!**/*.md']
instrumentation-aspnet: ['*/OpenTelemetry.Instrumentation.AspNet/**', '*/OpenTelemetry.Instrumentation.AspNet.Tests/**', '*/OpenTelemetry.Instrumentation.OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule.*/**', 'examples/AspNet/**', '!**/*.md']
instrumentation-aspnetcore: ['*/OpenTelemetry.Instrumentation.AspNetCore*/**', '!**/*.md']
instrumentation-aws: ['*/OpenTelemetry.Instrumentation.AWS/**', '*/OpenTelemetry.Instrumentation.AWS.Tests/**', '!**/*.md']
instrumentation-aws-lambda: ['*/OpenTelemetry.Instrumentation.AWSLambda/**', '*/OpenTelemetry.Instrumentation.AWSLambda.Tests/**', '!**/*.md']
instrumentation-aws: ['*/OpenTelemetry.Extensions.AWS*/**', '*/OpenTelemetry.Instrumentation.AWS*/**', '!**/*.md']
instrumentation-cassandra: ['*/OpenTelemetry.Instrumentation.Cassandra*/**', '!**/*.md']
instrumentation-confluentkafka: ['*/OpenTelemetry.Instrumentation.ConfluentKafka*/**', 'examples/kafka/**', '!**/*.md']
instrumentation-elasticsearchclient: ['*/OpenTelemetry.Instrumentation.ElasticsearchClient*/**', '!**/*.md']
Expand All @@ -61,7 +59,7 @@ jobs:
resources-operatingsystem: ['*/OpenTelemetry.Resources.OperatingSystem/**', '*/OpenTelemetry.Resources.OperatingSystem.Tests/**', '!**/*.md']
resources-process: ['*/OpenTelemetry.Resources.Process/**', '*/OpenTelemetry.Resources.Process.Tests/**', '!**/*.md']
resources-processruntime: ['*/OpenTelemetry.Resources.ProcessRuntime/**', '*/OpenTelemetry.Resources.ProcessRuntime.Tests/**', '!**/*.md']
sampler-aws: ['*/OpenTelemetry.Sampler.AWS**/**', '!**/*.md']
sampler-aws: ['*/OpenTelemetry.Sampler.AWS*/**', '!**/*.md']
semanticconventions: ['*/OpenTelemetry.SemanticConventions*/**', '!**/*.md']
lint-md:
Expand Down Expand Up @@ -151,17 +149,6 @@ jobs:
project-name: Component[OpenTelemetry.Extensions]
code-cov-name: Extensions

build-test-extensions-aws:
needs: detect-changes
if: |
contains(needs.detect-changes.outputs.changes, 'extensions-aws')
|| contains(needs.detect-changes.outputs.changes, 'build')
|| contains(needs.detect-changes.outputs.changes, 'shared')
uses: ./.github/workflows/Component.BuildTest.yml
with:
project-name: Component[OpenTelemetry.Extensions.AWS]
code-cov-name: Extensions.AWS

build-test-extensions-enrichment:
needs: detect-changes
if: |
Expand Down Expand Up @@ -196,7 +183,7 @@ jobs:
with:
project-name: OpenTelemetry.Instrumentation.AspNetCore
code-cov-name: Instrumentation.AspNetCore
tfm-list: '[ "net6.0", "net8.0" ]'
tfm-list: '[ "net8.0" ]'

build-test-instrumentation-aws:
needs: detect-changes
Expand All @@ -206,21 +193,9 @@ jobs:
|| contains(needs.detect-changes.outputs.changes, 'shared')
uses: ./.github/workflows/Component.BuildTest.yml
with:
project-name: Component[OpenTelemetry.Instrumentation.AWS]
project-name: OpenTelemetry.Instrumentation.AWS
code-cov-name: Instrumentation.AWS

build-test-instrumentation-awslambda:
needs: detect-changes
if: |
contains(needs.detect-changes.outputs.changes, 'instrumentation-awslambda')
|| contains(needs.detect-changes.outputs.changes, 'build')
|| contains(needs.detect-changes.outputs.changes, 'shared')
uses: ./.github/workflows/Component.BuildTest.yml
with:
project-name: Component[OpenTelemetry.Instrumentation.AWSLambda]
code-cov-name: Instrumentation.AWSLambda
tfm-list: '[ "net6.0", "net8.0" ]'

build-test-instrumentation-cassandra:
needs: detect-changes
if: |
Expand All @@ -231,6 +206,11 @@ jobs:
with:
project-name: Component[OpenTelemetry.Instrumentation.Cassandra]
code-cov-name: Instrumentation.Cassandra
run-tests: false
# Note: There is a unit test project for Cassandra but it only contains
# integration tests, which get skipped. This results in empty coverage
# files which messes with codecov. Enable tests if any real unit tests
# get added.

build-test-instrumentation-confluentkafka:
needs: detect-changes
Expand Down Expand Up @@ -285,7 +265,7 @@ jobs:
with:
project-name: OpenTelemetry.Instrumentation.EventCounters
code-cov-name: Instrumentation.EventCounters
tfm-list: '[ "net6.0", "net8.0" ]'
tfm-list: '[ "net8.0" ]'

build-test-instrumentation-grpccore:
needs: detect-changes
Expand Down Expand Up @@ -524,7 +504,7 @@ jobs:
build-test-sampler-aws:
needs: detect-changes
if: |
contains(needs.detect-changes.outputs.changes, 'resources-sampler-aws')
contains(needs.detect-changes.outputs.changes, 'sampler-aws')
|| contains(needs.detect-changes.outputs.changes, 'build')
|| contains(needs.detect-changes.outputs.changes, 'shared')
uses: ./.github/workflows/Component.BuildTest.yml
Expand All @@ -542,6 +522,7 @@ jobs:
with:
project-name: OpenTelemetry.SemanticConventions
code-cov-name: SemanticConventions
run-tests: false # Note: No test project

build-test-contrib-shared-tests:
needs: detect-changes
Expand All @@ -563,7 +544,6 @@ jobs:
|| contains(needs.detect-changes.outputs.changes, 'extensions-enrichment')
|| contains(needs.detect-changes.outputs.changes, 'instrumentation-aspnetcore')
|| contains(needs.detect-changes.outputs.changes, 'instrumentation-aws')
|| contains(needs.detect-changes.outputs.changes, 'instrumentation-awslambda')
|| contains(needs.detect-changes.outputs.changes, 'instrumentation-confluentkafka')
|| contains(needs.detect-changes.outputs.changes, 'instrumentation-eventcounters')
|| contains(needs.detect-changes.outputs.changes, 'instrumentation-grpcnetclient')
Expand Down Expand Up @@ -598,12 +578,10 @@ jobs:
build-test-exporter-onecollector,
build-test-exporter-stackdriver,
build-test-extensions,
build-test-extensions-aws,
build-test-extensions-enrichment,
build-test-instrumentation-aspnet,
build-test-instrumentation-aspnetcore,
build-test-instrumentation-aws,
build-test-instrumentation-awslambda,
build-test-instrumentation-cassandra,
build-test-instrumentation-confluentkafka,
build-test-instrumentation-elasticsearchclient,
Expand Down
3 changes: 2 additions & 1 deletion build/Common.nonprod.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
Refer to https://docs.microsoft.com/en-us/nuget/concepts/package-versioning for semver syntax.
-->
<BenchmarkDotNetPkgVer>[0.13.12,0.14)</BenchmarkDotNetPkgVer>
<MicrosoftExtensionsHostingPkgVer>8.0.0</MicrosoftExtensionsHostingPkgVer>
<MicrosoftExtensionsConfigurationJsonPkgVer>8.0.1</MicrosoftExtensionsConfigurationJsonPkgVer>
<MicrosoftExtensionsHostingPkgVer>8.0.1</MicrosoftExtensionsHostingPkgVer>
<MicrosoftNETTestSdkPkgVer>[17.11.1,18.0)</MicrosoftNETTestSdkPkgVer>
<OpenTelemetryExporterInMemoryPkgVer>$(OpenTelemetryCoreLatestVersion)</OpenTelemetryExporterInMemoryPkgVer>
<SupportedNetTargets>net8.0;net6.0</SupportedNetTargets>
Expand Down
Loading

0 comments on commit 3a69654

Please sign in to comment.