Compare commits
114 Commits
coreunstab
...
main
Author | SHA1 | Date |
---|---|---|
|
f153e130b4 | |
|
b659171101 | |
|
2a9c406b6d | |
|
bab4b954cd | |
|
cd522d9081 | |
|
8321588b28 | |
|
62162211ad | |
|
7a4643a829 | |
|
84b3ca4e11 | |
|
0ebe718c70 | |
|
a871f0fc68 | |
|
44f46b1656 | |
|
ca892e44a9 | |
|
a067b8f437 | |
|
2e73a2c468 | |
|
4bab51a01a | |
|
81f29e6068 | |
|
583166cc71 | |
|
e2fdf99f52 | |
|
d2f8e54bb9 | |
|
27234c2a14 | |
|
6b58da89e2 | |
|
accfea63fe | |
|
570a6fa687 | |
|
4dc60007ca | |
|
e67ecf8164 | |
|
98a8d38e8a | |
|
e5b9a9a3db | |
|
be60150962 | |
|
7f111ea831 | |
|
a8ef3e1888 | |
|
9480cb3e9a | |
|
b921486b67 | |
|
5ff15e58c1 | |
|
872ab2b80c | |
|
21af34df63 | |
|
2b20ffc1ed | |
|
7ccfda242a | |
|
6f805344dd | |
|
d8dfaa84a3 | |
|
361a1655b9 | |
|
a2679d5a6d | |
|
0ad46df6cf | |
|
393b5e04f3 | |
|
5963d1d710 | |
|
afe1a5bb11 | |
|
4e9e37fa35 | |
|
f8dc06acf2 | |
|
869d9475ef | |
|
12b994ceda | |
|
5a89e2cfe8 | |
|
cd796552ef | |
|
42fe0738cb | |
|
796be6b4a9 | |
|
e58ee78c2d | |
|
309ed2e7a8 | |
|
04a48b6033 | |
|
4eb55be9a9 | |
|
19afd63555 | |
|
b76121e858 | |
|
b83bc6800e | |
|
7ed91a108f | |
|
5acf77cf04 | |
|
1479b236f7 | |
|
05f74a4c36 | |
|
a2bb510f79 | |
|
4f51654047 | |
|
bd434cc9ae | |
|
e76e0f9f44 | |
|
3401b31085 | |
|
5f9b011c0f | |
|
e9cfc33fad | |
|
154a6dc10b | |
|
21993b01a3 | |
|
d324abb29d | |
|
7cad682002 | |
|
52edab3c8c | |
|
eb0ddd1273 | |
|
dde8f4024b | |
|
e21e9ccd24 | |
|
a10f955cd9 | |
|
6c826c7176 | |
|
260e25271d | |
|
f067d0db96 | |
|
ed26d99bf5 | |
|
78a71ebbf7 | |
|
3f86f47ac3 | |
|
4e84aa72dd | |
|
b552c7f9bf | |
|
74352b8769 | |
|
1f9fa9ffe7 | |
|
77e73ced3c | |
|
15446598f6 | |
|
ec554f9eb0 | |
|
9ecf6b77bc | |
|
fb4bb17b34 | |
|
b884697d47 | |
|
d5f6732118 | |
|
1065e43060 | |
|
0ad6a95bf2 | |
|
3c9beb896b | |
|
7abe983ac0 | |
|
844e148f68 | |
|
3f9b636f06 | |
|
6209ed8f80 | |
|
60a3839591 | |
|
805dd6b4ab | |
|
6828791c61 | |
|
c638ef67cf | |
|
6420be005b | |
|
ee720ba3a3 | |
|
8c1e63894f | |
|
9c9d8585f3 | |
|
c4268fe92b |
|
@ -0,0 +1,4 @@
|
||||||
|
# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
|
||||||
|
exemptions:
|
||||||
|
- check: artifacthub_badge
|
||||||
|
reason: "Artifact Hub doesn't support .NET packages"
|
|
@ -10,6 +10,9 @@ indent_size = 2
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.sh]
|
||||||
|
end_of_line = lf
|
||||||
|
|
||||||
[*.{cs,cshtml,htm,html,md,py,sln,xml}]
|
[*.{cs,cshtml,htm,html,md,py,sln,xml}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
*.sh eol=lf
|
|
@ -62,7 +62,7 @@ body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Steps to Reproduce
|
label: Steps to Reproduce
|
||||||
description: Provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). We will close the issue if the repro project you share with us is complex or we cannot reproduce the behavior you are reporting. We cannot investigate custom projects, so don't point us to such, please.
|
description: Provide a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). We will close the issue if the repro project you share with us is complex or we cannot reproduce the behavior you are reporting. We cannot investigate custom projects, so don't point us to such, please.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
@ -84,3 +84,11 @@ body:
|
||||||
attributes:
|
attributes:
|
||||||
label: Additional Context
|
label: Additional Context
|
||||||
description: Any additional information you think may be relevant to this issue.
|
description: Any additional information you think may be relevant to this issue.
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Tip
|
||||||
|
description: This element is static, used to render a helpful sub-heading for end-users and community members to help prioritize issues. Please leave as is.
|
||||||
|
options:
|
||||||
|
- "<sub>[React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with :+1: to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>"
|
||||||
|
default: 0
|
||||||
|
|
|
@ -53,3 +53,11 @@ body:
|
||||||
attributes:
|
attributes:
|
||||||
label: Additional context
|
label: Additional context
|
||||||
description: Any additional information you think may be relevant to this feature request.
|
description: Any additional information you think may be relevant to this feature request.
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Tip
|
||||||
|
description: This element is static, used to render a helpful sub-heading for end-users and community members to help prioritize issues. Please leave as is.
|
||||||
|
options:
|
||||||
|
- "<sub>[React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with :+1: to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>"
|
||||||
|
default: 0
|
||||||
|
|
|
@ -6,6 +6,54 @@ updates:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
labels:
|
labels:
|
||||||
- "infra"
|
- "infra"
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/examples/MicroserviceExample/WebApi"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "wednesday"
|
||||||
|
labels:
|
||||||
|
- "infra"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "*"
|
||||||
|
update-types:
|
||||||
|
- "version-update:semver-major"
|
||||||
|
- "version-update:semver-minor"
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "examples/MicroserviceExample/WorkerService"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "wednesday"
|
||||||
|
labels:
|
||||||
|
- "infra"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "*"
|
||||||
|
update-types:
|
||||||
|
- "version-update:semver-major"
|
||||||
|
- "version-update:semver-minor"
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "wednesday"
|
||||||
|
labels:
|
||||||
|
- "infra"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "*"
|
||||||
|
update-types:
|
||||||
|
- "version-update:semver-major"
|
||||||
|
- "version-update:semver-minor"
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "wednesday"
|
||||||
|
labels:
|
||||||
|
- "infra"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "*"
|
||||||
|
update-types:
|
||||||
|
- "version-update:semver-major"
|
||||||
|
- "version-update:semver-minor"
|
||||||
- package-ecosystem: "dotnet-sdk"
|
- package-ecosystem: "dotnet-sdk"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
|
@ -18,3 +66,10 @@ updates:
|
||||||
update-types:
|
update-types:
|
||||||
- "version-update:semver-major"
|
- "version-update:semver-major"
|
||||||
- "version-update:semver-minor"
|
- "version-update:semver-minor"
|
||||||
|
- package-ecosystem: "pip"
|
||||||
|
directory: "test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "wednesday"
|
||||||
|
labels:
|
||||||
|
- "infra"
|
||||||
|
|
|
@ -28,6 +28,9 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test:
|
build-test:
|
||||||
|
|
||||||
|
@ -46,14 +49,20 @@ jobs:
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||||
# the version tag which is typically NOT on the first commit so we
|
# the version tag which is typically NOT on the first commit so we
|
||||||
# retrieve them all.
|
# retrieve them all.
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup dotnet
|
- name: Setup previous .NET runtimes
|
||||||
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
with:
|
||||||
|
dotnet-version: |
|
||||||
|
8.0.x
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
|
||||||
- name: dotnet restore ${{ inputs.project-name }}
|
- name: dotnet restore ${{ inputs.project-name }}
|
||||||
|
@ -63,7 +72,18 @@ jobs:
|
||||||
run: dotnet build ${{ inputs.project-name }} --configuration Release --no-restore ${{ inputs.project-build-commands }}
|
run: dotnet build ${{ inputs.project-name }} --configuration Release --no-restore ${{ inputs.project-build-commands }}
|
||||||
|
|
||||||
- name: dotnet test ${{ inputs.project-name }}
|
- name: dotnet test ${{ inputs.project-name }}
|
||||||
run: dotnet test ${{ inputs.project-name }} --collect:"Code Coverage" --results-directory:TestResults --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed" -- RunConfiguration.DisableAppDomain=true
|
run: >
|
||||||
|
dotnet test ${{ inputs.project-name }}
|
||||||
|
--collect:"Code Coverage"
|
||||||
|
--results-directory:TestResults
|
||||||
|
--framework ${{ matrix.version }}
|
||||||
|
--configuration Release
|
||||||
|
--no-restore
|
||||||
|
--no-build
|
||||||
|
--logger:"console;verbosity=detailed"
|
||||||
|
--logger:"GitHubActions;report-warnings=false"
|
||||||
|
--logger:"junit;LogFilePath=TestResults/junit.xml"
|
||||||
|
-- RunConfiguration.DisableAppDomain=true
|
||||||
|
|
||||||
- name: Install coverage tool
|
- name: Install coverage tool
|
||||||
run: dotnet tool install -g dotnet-coverage
|
run: dotnet tool install -g dotnet-coverage
|
||||||
|
@ -72,15 +92,24 @@ jobs:
|
||||||
run: dotnet-coverage merge -f cobertura -o ./TestResults/Cobertura.xml ./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 }}
|
- name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||||
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
|
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
|
||||||
continue-on-error: true # Note: Don't fail for upload failures
|
continue-on-error: true # Note: Don't fail for upload failures
|
||||||
env:
|
env:
|
||||||
OS: ${{ matrix.os }}
|
OS: ${{ matrix.os }}
|
||||||
TFM: ${{ matrix.version }}
|
TFM: ${{ matrix.version }}
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
files: TestResults/Cobertura.xml
|
files: TestResults/Cobertura.xml
|
||||||
env_vars: OS,TFM
|
env_vars: OS,TFM
|
||||||
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||||
name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
|
name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
|
||||||
codecov_yml_path: .github/codecov.yml
|
codecov_yml_path: .github/codecov.yml
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload test results ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||||
|
if: ${{ !cancelled() && hashFiles('./**/TestResults/junit.xml') != '' }}
|
||||||
|
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
|
||||||
|
with:
|
||||||
|
env_vars: OS,TFM
|
||||||
|
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||||
|
name: Test results for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
|
@ -7,18 +7,19 @@ on:
|
||||||
branches: [ 'main*' ]
|
branches: [ 'main*' ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
contents: read
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
add-labels-on-issues:
|
add-labels-on-issues:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
if: github.event_name == 'issues' && !github.event.issue.pull_request
|
if: github.event_name == 'issues' && !github.event.issue.pull_request
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Add labels for package found in bug issue descriptions
|
- name: Add labels for package found in bug issue descriptions
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
@ -33,13 +34,15 @@ jobs:
|
||||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||||
|
|
||||||
add-labels-on-pull-requests:
|
add-labels-on-pull-requests:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
if: github.event_name == 'pull_request_target'
|
if: github.event_name == 'pull_request_target'
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.repository.default_branch }} # Note: Do not run on the PR branch we want to execute add-labels.psm1 from main on the base repo only because pull_request_target can see secrets
|
ref: ${{ github.event.repository.default_branch }} # Note: Do not run on the PR branch we want to execute add-labels.psm1 from main on the base repo only because pull_request_target can see secrets
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,9 @@ on:
|
||||||
OPENTELEMETRYBOT_GITHUB_TOKEN:
|
OPENTELEMETRYBOT_GITHUB_TOKEN:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
resolve-automation:
|
resolve-automation:
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,9 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ 'main*' ]
|
branches: [ 'main*' ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-misspell-sanitycheck:
|
lint-misspell-sanitycheck:
|
||||||
uses: ./.github/workflows/sanitycheck.yml
|
uses: ./.github/workflows/sanitycheck.yml
|
||||||
|
@ -18,7 +21,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
changes: ${{ steps.changes.outputs.changes }}
|
changes: ${{ steps.changes.outputs.changes }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- uses: AurorNZ/paths-filter@3b1f3abc3371cca888d8eb03dfa70bc8a9867629 # v4.0.0
|
- uses: AurorNZ/paths-filter@3b1f3abc3371cca888d8eb03dfa70bc8a9867629 # v4.0.0
|
||||||
id: changes
|
id: changes
|
||||||
with:
|
with:
|
||||||
|
@ -113,7 +116,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
version: [ net8.0, net9.0 ]
|
version: [ net8.0, net9.0 ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- name: Run OTLP Exporter docker compose
|
- name: Run OTLP Exporter docker compose
|
||||||
run: docker compose --file=test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
run: docker compose --file=test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
||||||
|
|
||||||
|
@ -131,7 +134,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
version: [ net8.0, net9.0 ]
|
version: [ net8.0, net9.0 ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- name: Run W3C Trace Context docker compose
|
- name: Run W3C Trace Context docker compose
|
||||||
run: docker compose --file=test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
run: docker compose --file=test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,32 @@
|
||||||
# For most projects, this workflow file will not need changing; you simply need
|
|
||||||
# to commit it to your repository.
|
|
||||||
#
|
|
||||||
# You may wish to alter this file to override the set of languages analyzed,
|
|
||||||
# or to provide custom queries or build logic.
|
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'main' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ 'main' ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *' # once in a day at 00:00
|
- cron: '0 0 * * *' # once in a day at 00:00
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
permissions:
|
||||||
|
actions: read # for github/codeql-action/init to get workflow details
|
||||||
|
contents: read # for actions/checkout to fetch code
|
||||||
|
security-events: write # for github/codeql-action/analyze to upload SARIF results
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: ['csharp']
|
language: ['actions', 'csharp']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: configure Pagefile
|
- name: Configure Pagefile
|
||||||
|
if: matrix.language == 'csharp'
|
||||||
uses: al-cheb/configure-pagefile-action@a3b6ebd6b634da88790d9c58d4b37a7f4a7b8708 # v1.4
|
uses: al-cheb/configure-pagefile-action@a3b6ebd6b634da88790d9c58d4b37a7f4a7b8708 # v1.4
|
||||||
with:
|
with:
|
||||||
minimum-size: 8GB
|
minimum-size: 8GB
|
||||||
|
@ -29,18 +34,38 @@ jobs:
|
||||||
disk-root: "D:"
|
disk-root: "D:"
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
filter: 'tree:0'
|
||||||
|
persist-credentials: false
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
|
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
|
||||||
with:
|
with:
|
||||||
|
build-mode: none
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
- name: Setup dotnet
|
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
|
||||||
|
|
||||||
- name: dotnet pack
|
|
||||||
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
|
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
|
||||||
|
with:
|
||||||
|
category: '/language:${{ matrix.language }}'
|
||||||
|
|
||||||
|
codeql:
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
needs: [ analyze ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Report status
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SCAN_SUCCESS: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
|
||||||
|
run: |
|
||||||
|
if [ "${SCAN_SUCCESS}" == "true" ]
|
||||||
|
then
|
||||||
|
echo 'CodeQL analysis successful'
|
||||||
|
else
|
||||||
|
echo 'CodeQL analysis failed'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
|
@ -5,6 +5,9 @@ name: Concurrency Tests
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-concurrency-tests:
|
run-concurrency-tests:
|
||||||
|
|
||||||
|
@ -17,7 +20,7 @@ jobs:
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
|
|
@ -5,13 +5,16 @@ name: Build docfx
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-docfx-build:
|
run-docfx-build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
|
|
@ -5,13 +5,16 @@ name: Lint - dotnet format
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-dotnet-format-stable:
|
run-dotnet-format-stable:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
@ -29,7 +32,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
|
|
@ -12,9 +12,9 @@ jobs:
|
||||||
fossa:
|
fossa:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: fossas/fossa-action@c0a7d013f84c8ee5e910593186598625513cc1e4 # v1.6.0
|
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
|
||||||
with:
|
with:
|
||||||
api-key: ${{secrets.FOSSA_API_KEY}}
|
api-key: ${{secrets.FOSSA_API_KEY}}
|
||||||
team: OpenTelemetry
|
team: OpenTelemetry
|
||||||
|
|
|
@ -5,16 +5,19 @@ name: Lint - Markdown
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-markdownlint:
|
run-markdownlint:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: run markdownlint
|
- name: run markdownlint
|
||||||
uses: DavidAnson/markdownlint-cli2-action@05f32210e84442804257b2a6f20b273450ec8265 # v19.1.0
|
uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # v20.0.0
|
||||||
with:
|
with:
|
||||||
globs: |
|
globs: |
|
||||||
**/*.md
|
**/*.md
|
||||||
|
|
|
@ -19,11 +19,11 @@ jobs:
|
||||||
# Needed for GitHub OIDC token if publish_results is true
|
# Needed for GitHub OIDC token if publish_results is true
|
||||||
id-token: write
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
|
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
|
||||||
with:
|
with:
|
||||||
results_file: results.sarif
|
results_file: results.sarif
|
||||||
results_format: sarif
|
results_format: sarif
|
||||||
|
@ -42,6 +42,6 @@ jobs:
|
||||||
# Upload the results to GitHub's code scanning dashboard (optional).
|
# Upload the results to GitHub's code scanning dashboard (optional).
|
||||||
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
|
uses: github/codeql-action/upload-sarif@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|
|
@ -5,12 +5,15 @@ name: Package Validation
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-package-validation-stable:
|
run-package-validation-stable:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||||
# the version tag which is typically NOT on the first commit so we
|
# the version tag which is typically NOT on the first commit so we
|
||||||
|
@ -27,14 +30,14 @@ jobs:
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: packages-stable
|
name: packages-stable
|
||||||
path: '.\src\**\*.*nupkg'
|
path: ./artifacts/package/release
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
run-package-validation-experimental:
|
run-package-validation-experimental:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||||
# the version tag which is typically NOT on the first commit so we
|
# the version tag which is typically NOT on the first commit so we
|
||||||
|
@ -51,5 +54,5 @@ jobs:
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: packages-experimental
|
name: packages-experimental
|
||||||
path: '.\src\**\*.*nupkg'
|
path: ./artifacts/package/release
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
|
@ -16,6 +16,9 @@ on:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
automation:
|
automation:
|
||||||
uses: ./.github/workflows/automation.yml
|
uses: ./.github/workflows/automation.yml
|
||||||
|
@ -41,7 +44,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||||
ref: ${{ github.event.repository.default_branch }}
|
ref: ${{ github.event.repository.default_branch }}
|
||||||
|
@ -75,7 +78,7 @@ jobs:
|
||||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit. We need all the tags
|
# Note: By default GitHub only fetches 1 commit. We need all the tags
|
||||||
# for this work.
|
# for this work.
|
||||||
|
|
|
@ -23,6 +23,9 @@ on:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
automation:
|
automation:
|
||||||
uses: ./.github/workflows/automation.yml
|
uses: ./.github/workflows/automation.yml
|
||||||
|
@ -40,7 +43,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||||
|
|
||||||
|
@ -76,7 +79,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||||
|
|
||||||
|
@ -110,7 +113,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
@ -149,7 +152,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
@ -188,13 +191,15 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||||
|
|
||||||
- name: Update release notes
|
- name: Update release notes
|
||||||
|
env:
|
||||||
|
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
Import-Module .\build\scripts\prepare-release.psm1
|
Import-Module .\build\scripts\prepare-release.psm1
|
||||||
|
@ -204,6 +209,6 @@ jobs:
|
||||||
-pullRequestNumber '${{ github.event.issue.number }}' `
|
-pullRequestNumber '${{ github.event.issue.number }}' `
|
||||||
-botUserName '${{ needs.automation.outputs.username }}' `
|
-botUserName '${{ needs.automation.outputs.username }}' `
|
||||||
-commentUserName '${{ github.event.comment.user.login }}' `
|
-commentUserName '${{ github.event.comment.user.login }}' `
|
||||||
-commentBody '${{ github.event.comment.body }}' `
|
-commentBody $Env:COMMENT_BODY `
|
||||||
-gitUserName '${{ needs.automation.outputs.username }}' `
|
-gitUserName '${{ needs.automation.outputs.username }}' `
|
||||||
-gitUserEmail '${{ needs.automation.outputs.email }}'
|
-gitUserEmail '${{ needs.automation.outputs.email }}'
|
||||||
|
|
|
@ -16,6 +16,9 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *' # once in a day at 00:00
|
- cron: '0 0 * * *' # once in a day at 00:00
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
automation:
|
automation:
|
||||||
uses: ./.github/workflows/automation.yml
|
uses: ./.github/workflows/automation.yml
|
||||||
|
@ -35,7 +38,7 @@ jobs:
|
||||||
artifact-id: ${{ steps.upload-artifacts.outputs.artifact-id }}
|
artifact-id: ${{ steps.upload-artifacts.outputs.artifact-id }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||||
# the version tag which is typically NOT on the first commit so we
|
# the version tag which is typically NOT on the first commit so we
|
||||||
|
@ -46,9 +49,9 @@ jobs:
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
|
||||||
- name: Install Cosign
|
- name: Install Cosign
|
||||||
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
|
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
|
||||||
with:
|
with:
|
||||||
cosign-release: v2.4.0
|
cosign-release: v2.5.3
|
||||||
|
|
||||||
- name: dotnet restore
|
- name: dotnet restore
|
||||||
run: dotnet restore ./build/OpenTelemetry.proj -p:RunningDotNetPack=true
|
run: dotnet restore ./build/OpenTelemetry.proj -p:RunningDotNetPack=true
|
||||||
|
@ -64,7 +67,7 @@ jobs:
|
||||||
foreach ($projectFile in $projectFiles) {
|
foreach ($projectFile in $projectFiles) {
|
||||||
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($projectFile)
|
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($projectFile)
|
||||||
|
|
||||||
Get-ChildItem -Path src/$projectName/bin/Release/*/$projectName.dll -File | ForEach-Object {
|
Get-ChildItem -Path artifacts/bin/$projectName/release_*/$projectName.dll -File | ForEach-Object {
|
||||||
$fileFullPath = $_.FullName
|
$fileFullPath = $_.FullName
|
||||||
Write-Host "Signing $fileFullPath"
|
Write-Host "Signing $fileFullPath"
|
||||||
|
|
||||||
|
@ -80,7 +83,8 @@ jobs:
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: ${{ github.ref_name }}-packages
|
name: ${{ github.ref_name }}-packages
|
||||||
path: 'src/**/*.*nupkg'
|
path: ./artifacts/package/release
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Publish MyGet
|
- name: Publish MyGet
|
||||||
env:
|
env:
|
||||||
|
@ -88,7 +92,7 @@ jobs:
|
||||||
if: env.MYGET_TOKEN_EXISTS == 'true' # Skip MyGet publish if run on a fork without the secret
|
if: env.MYGET_TOKEN_EXISTS == 'true' # Skip MyGet publish if run on a fork without the secret
|
||||||
run: |
|
run: |
|
||||||
nuget setApiKey ${{ secrets.MYGET_TOKEN }} -Source https://www.myget.org/F/opentelemetry/api/v2/package
|
nuget setApiKey ${{ secrets.MYGET_TOKEN }} -Source https://www.myget.org/F/opentelemetry/api/v2/package
|
||||||
nuget push src/**/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package
|
nuget push ./artifacts/package/release/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package
|
||||||
|
|
||||||
post-build:
|
post-build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
@ -104,7 +108,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,16 @@ name: Lint - Spelling & Encoding
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-misspell:
|
run-misspell:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: install misspell
|
- name: install misspell
|
||||||
run: |
|
run: |
|
||||||
|
@ -26,7 +29,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: detect non-ASCII encoding and trailing space
|
- name: detect non-ASCII encoding and trailing space
|
||||||
run: python3 ./build/scripts/sanitycheck.py
|
run: python3 ./build/scripts/sanitycheck.py
|
||||||
|
|
|
@ -6,8 +6,14 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "12 3 * * *" # arbitrary time not to DDOS GitHub
|
- cron: "12 3 * * *" # arbitrary time not to DDOS GitHub
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
permissions:
|
||||||
|
issues: write # for actions/stale to close stale issues
|
||||||
|
pull-requests: write # for actions/stale to close stale PRs
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
|
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
|
||||||
|
@ -22,4 +28,5 @@ jobs:
|
||||||
days-before-pr-close: 7
|
days-before-pr-close: 7
|
||||||
days-before-issue-close: 7
|
days-before-issue-close: 7
|
||||||
exempt-all-issue-milestones: true
|
exempt-all-issue-milestones: true
|
||||||
exempt-issue-labels: needs-triage
|
exempt-issue-labels: 'keep-open,needs-triage'
|
||||||
|
exempt-pr-labels: 'keep-open'
|
||||||
|
|
|
@ -5,6 +5,9 @@ name: Publish & Verify AOT Compatibility
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-verify-aot-compat:
|
run-verify-aot-compat:
|
||||||
|
|
||||||
|
@ -16,7 +19,7 @@ jobs:
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
x64/
|
x64/
|
||||||
x86/
|
x86/
|
||||||
bld/
|
bld/
|
||||||
|
[Aa]rtifacts/
|
||||||
[Bb]in/
|
[Bb]in/
|
||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
[Ll]og/
|
[Ll]og/
|
||||||
|
@ -351,3 +352,6 @@ tempo-data/
|
||||||
|
|
||||||
# Coyote Rewrite Files
|
# Coyote Rewrite Files
|
||||||
rewrite.coyote.json
|
rewrite.coyote.json
|
||||||
|
|
||||||
|
# Test results
|
||||||
|
TestResults/
|
||||||
|
|
|
@ -10,3 +10,6 @@ MD013:
|
||||||
MD033:
|
MD033:
|
||||||
# Allowed elements
|
# Allowed elements
|
||||||
allowed_elements: [ 'details', 'summary' ]
|
allowed_elements: [ 'details', 'summary' ]
|
||||||
|
|
||||||
|
# MD059/link-text-should-be-descriptive : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
|
||||||
|
MD059: false
|
||||||
|
|
|
@ -14,10 +14,33 @@ Anyone may contribute but there are benefits of being a member of our community.
|
||||||
See the [community membership
|
See the [community membership
|
||||||
document](https://github.com/open-telemetry/community/blob/main/community-membership.md)
|
document](https://github.com/open-telemetry/community/blob/main/community-membership.md)
|
||||||
on how to become a
|
on how to become a
|
||||||
[**Member**](https://github.com/open-telemetry/community/blob/main/community-membership.md#member),
|
[**Member**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#member),
|
||||||
[**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
|
[**Triager**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager),
|
||||||
|
[**Approver**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver),
|
||||||
and
|
and
|
||||||
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
|
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
|
||||||
|
|
||||||
|
## Give feedback
|
||||||
|
|
||||||
|
We are always looking for your feedback.
|
||||||
|
|
||||||
|
You can do this by [submitting a GitHub issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/new).
|
||||||
|
|
||||||
|
You may also prefer writing on [#otel-dotnet Slack channel](https://cloud-native.slack.com/archives/C01N3BC2W7Q).
|
||||||
|
|
||||||
|
### Report a bug
|
||||||
|
|
||||||
|
Reporting bugs is an important contribution. Please make sure to include:
|
||||||
|
|
||||||
|
* Expected and actual behavior;
|
||||||
|
* OpenTelemetry, OS, and .NET versions you are using;
|
||||||
|
* Steps to reproduce;
|
||||||
|
* [Minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).
|
||||||
|
|
||||||
|
### Request a feature
|
||||||
|
|
||||||
|
If you would like to work on something that is not listed as an issue
|
||||||
|
(e.g. a new feature or enhancement) please create an issue and describe your proposal.
|
||||||
|
|
||||||
## Find a buddy and get started quickly
|
## Find a buddy and get started quickly
|
||||||
|
|
||||||
|
@ -300,9 +323,6 @@ types](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-type
|
||||||
* Pass [static
|
* Pass [static
|
||||||
analysis](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview).
|
analysis](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview).
|
||||||
|
|
||||||
New projects MUST enable static analysis by specifying
|
|
||||||
`<AnalysisLevel>latest-all</AnalysisLevel>` in the project file (`.csproj`).
|
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> There are other project-level features enabled automatically via
|
> There are other project-level features enabled automatically via
|
||||||
[Common.props](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/Common.props)
|
[Common.props](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/Common.props)
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ArtifactsPath>$([System.IO.Path]::Combine('$(MSBuildThisFileDirectory)', 'artifacts'))</ArtifactsPath>
|
||||||
|
<UseArtifactsOutput>true</UseArtifactsOutput>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -83,14 +83,16 @@
|
||||||
These packages are referenced as "PrivateAssets" or used in tests/examples.
|
These packages are referenced as "PrivateAssets" or used in tests/examples.
|
||||||
-->
|
-->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="BenchmarkDotNet" Version="[0.13.12,0.14)" />
|
<PackageVersion Include="BenchmarkDotNet" Version="0.15.2" />
|
||||||
<PackageVersion Include="CommandLineParser" Version="[2.9.1,3.0)" />
|
<PackageVersion Include="CommandLineParser" Version="[2.9.1,3.0)" />
|
||||||
|
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
|
||||||
<PackageVersion Include="Grpc.AspNetCore" Version="[2.59.0,3.0)" />
|
<PackageVersion Include="Grpc.AspNetCore" Version="[2.59.0,3.0)" />
|
||||||
<PackageVersion Include="Grpc.AspNetCore.Server" Version="[2.59.0, 3.0)" />
|
<PackageVersion Include="Grpc.AspNetCore.Server" Version="[2.59.0, 3.0)" />
|
||||||
<PackageVersion Include="Grpc.Tools" Version="[2.59.0,3.0)" />
|
<PackageVersion Include="Grpc.Tools" Version="[2.59.0,3.0)" />
|
||||||
<PackageVersion Include="Google.Protobuf" Version="[3.22.5,4.0)" />
|
<PackageVersion Include="Google.Protobuf" Version="[3.22.5,4.0)" />
|
||||||
<PackageVersion Include="Grpc" Version="[2.44.0,3.0)" />
|
<PackageVersion Include="Grpc" Version="[2.44.0,3.0)" />
|
||||||
<PackageVersion Include="Grpc.Net.Client" Version="[2.52.0,3.0)" />
|
<PackageVersion Include="Grpc.Net.Client" Version="[2.52.0,3.0)" />
|
||||||
|
<PackageVersion Include="JunitXml.TestLogger" Version="6.1.0" />
|
||||||
<PackageVersion Include="Microsoft.CSharp" Version="[4.7.0]" />
|
<PackageVersion Include="Microsoft.CSharp" Version="[4.7.0]" />
|
||||||
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="[3.11.0-beta1.23525.2]" />
|
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="[3.11.0-beta1.23525.2]" />
|
||||||
<PackageVersion Include="Microsoft.Coyote" Version="1.7.11" />
|
<PackageVersion Include="Microsoft.Coyote" Version="1.7.11" />
|
||||||
|
@ -101,7 +103,6 @@
|
||||||
<PackageVersion Include="Microsoft.Extensions.Telemetry.Abstractions" Version="[9.0.0,)" />
|
<PackageVersion Include="Microsoft.Extensions.Telemetry.Abstractions" Version="[9.0.0,)" />
|
||||||
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="[1.0.3,2.0)" />
|
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="[1.0.3,2.0)" />
|
||||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="[17.13.0,18.0.0)" />
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="[17.13.0,18.0.0)" />
|
||||||
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="[8.0.0,9.0)" />
|
|
||||||
<PackageVersion Include="MinVer" Version="[5.0.0,6.0)" />
|
<PackageVersion Include="MinVer" Version="[5.0.0,6.0)" />
|
||||||
<PackageVersion Include="NuGet.Versioning" Version="6.11.0" />
|
<PackageVersion Include="NuGet.Versioning" Version="6.11.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="[1.9.0,2.0)" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="[1.9.0,2.0)" />
|
||||||
|
|
|
@ -3,19 +3,14 @@
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<clear />
|
<clear />
|
||||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||||
<add key="dotnet8" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json" />
|
|
||||||
</packageSources>
|
</packageSources>
|
||||||
|
|
||||||
<!-- Define mappings by adding package patterns beneath the target source. -->
|
<!-- Define mappings by adding package patterns beneath the target source. -->
|
||||||
<!-- *.Tools packages will be restored from ".Net Core Tools", everything else from nuget.org. -->
|
|
||||||
<packageSourceMapping>
|
<packageSourceMapping>
|
||||||
<!-- key value for <packageSource> should match key values from <packageSources> element -->
|
<!-- key value for <packageSource> should match key values from <packageSources> element -->
|
||||||
<packageSource key="NuGet">
|
<packageSource key="NuGet">
|
||||||
<package pattern="*" />
|
<package pattern="*" />
|
||||||
</packageSource>
|
</packageSource>
|
||||||
<packageSource key="dotnet8">
|
|
||||||
<package pattern="Microsoft.CodeAnalysis.PublicApiAnalyzers" />
|
|
||||||
</packageSource>
|
|
||||||
</packageSourceMapping>
|
</packageSourceMapping>
|
||||||
|
|
||||||
<disabledPackageSources />
|
<disabledPackageSources />
|
||||||
|
|
|
@ -254,7 +254,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A49299
|
||||||
src\Shared\ExceptionExtensions.cs = src\Shared\ExceptionExtensions.cs
|
src\Shared\ExceptionExtensions.cs = src\Shared\ExceptionExtensions.cs
|
||||||
src\Shared\Guard.cs = src\Shared\Guard.cs
|
src\Shared\Guard.cs = src\Shared\Guard.cs
|
||||||
src\Shared\MathHelper.cs = src\Shared\MathHelper.cs
|
src\Shared\MathHelper.cs = src\Shared\MathHelper.cs
|
||||||
src\Shared\PeerServiceResolver.cs = src\Shared\PeerServiceResolver.cs
|
|
||||||
src\Shared\PeriodicExportingMetricReaderHelper.cs = src\Shared\PeriodicExportingMetricReaderHelper.cs
|
src\Shared\PeriodicExportingMetricReaderHelper.cs = src\Shared\PeriodicExportingMetricReaderHelper.cs
|
||||||
src\Shared\PooledList.cs = src\Shared\PooledList.cs
|
src\Shared\PooledList.cs = src\Shared\PooledList.cs
|
||||||
src\Shared\ResourceSemanticConventions.cs = src\Shared\ResourceSemanticConventions.cs
|
src\Shared\ResourceSemanticConventions.cs = src\Shared\ResourceSemanticConventions.cs
|
||||||
|
|
47
README.md
47
README.md
|
@ -6,6 +6,11 @@
|
||||||
[](https://www.nuget.org/profiles/OpenTelemetry)
|
[](https://www.nuget.org/profiles/OpenTelemetry)
|
||||||
[](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/ci.yml)
|
[](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/ci.yml)
|
||||||
|
|
||||||
|
[](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-dotnet)
|
||||||
|
[](https://www.bestpractices.dev/projects/10017)
|
||||||
|
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet?ref=badge_shield&issueType=license)
|
||||||
|
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet?ref=badge_shield&issueType=security)
|
||||||
|
|
||||||
The .NET [OpenTelemetry](https://opentelemetry.io/) implementation.
|
The .NET [OpenTelemetry](https://opentelemetry.io/) implementation.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
@ -231,26 +236,38 @@ regardless of your experience level. Whether you're a seasoned OpenTelemetry
|
||||||
developer, just starting your journey, or simply curious about the work we do,
|
developer, just starting your journey, or simply curious about the work we do,
|
||||||
you're more than welcome to participate!
|
you're more than welcome to participate!
|
||||||
|
|
||||||
[Maintainers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer)
|
### Maintainers
|
||||||
([@open-telemetry/dotnet-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-maintainers)):
|
|
||||||
|
|
||||||
* [Alan West](https://github.com/alanwest), New Relic
|
* [Alan West](https://github.com/alanwest), New Relic
|
||||||
* [Rajkumar Rangaraj](https://github.com/rajkumar-rangaraj), Microsoft
|
* [Rajkumar Rangaraj](https://github.com/rajkumar-rangaraj), Microsoft
|
||||||
|
|
||||||
[Emeritus Maintainers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager):
|
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
|
||||||
|
|
||||||
|
### Approvers
|
||||||
|
|
||||||
|
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
|
||||||
|
* [Martin Costello](https://github.com/martincostello), Grafana Labs
|
||||||
|
* [Mikel Blanchard](https://github.com/CodeBlanch), Microsoft
|
||||||
|
* [Piotr Kiełkowicz](https://github.com/Kielek), Splunk
|
||||||
|
|
||||||
|
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
|
||||||
|
|
||||||
|
### Triagers
|
||||||
|
|
||||||
|
* [Martin Thwaites](https://github.com/martinjt), Honeycomb
|
||||||
|
* [Timothy "Mothra" Lee](https://github.com/TimothyMothra)
|
||||||
|
|
||||||
|
For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
|
||||||
|
|
||||||
|
### Emeritus Maintainers
|
||||||
|
|
||||||
* [Mike Goldsmith](https://github.com/MikeGoldsmith)
|
* [Mike Goldsmith](https://github.com/MikeGoldsmith)
|
||||||
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev)
|
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev)
|
||||||
* [Utkarsh Umesan Pillai](https://github.com/utpilla)
|
* [Utkarsh Umesan Pillai](https://github.com/utpilla)
|
||||||
|
|
||||||
[Approvers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver)
|
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
|
||||||
([@open-telemetry/dotnet-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-approvers)):
|
|
||||||
|
|
||||||
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
|
### Emeritus Approvers
|
||||||
* [Mikel Blanchard](https://github.com/CodeBlanch), Microsoft
|
|
||||||
* [Piotr Kiełkowicz](https://github.com/Kielek), Splunk
|
|
||||||
|
|
||||||
[Emeritus Approvers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager):
|
|
||||||
|
|
||||||
* [Bruno Garcia](https://github.com/bruno-garcia)
|
* [Bruno Garcia](https://github.com/bruno-garcia)
|
||||||
* [Eddy Nakamura](https://github.com/eddynaka)
|
* [Eddy Nakamura](https://github.com/eddynaka)
|
||||||
|
@ -260,16 +277,14 @@ you're more than welcome to participate!
|
||||||
* [Robert Pająk](https://github.com/pellared)
|
* [Robert Pająk](https://github.com/pellared)
|
||||||
* [Vishwesh Bankwar](https://github.com/vishweshbankwar)
|
* [Vishwesh Bankwar](https://github.com/vishweshbankwar)
|
||||||
|
|
||||||
[Triagers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager)
|
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
|
||||||
([@open-telemetry/dotnet-triagers](https://github.com/orgs/open-telemetry/teams/dotnet-triagers)):
|
|
||||||
|
|
||||||
* [Martin Thwaites](https://github.com/martinjt), Honeycomb
|
### Emeritus Triagers
|
||||||
* [Timothy "Mothra" Lee](https://github.com/TimothyMothra), Microsoft
|
|
||||||
|
|
||||||
[Emeritus Triagers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager):
|
|
||||||
|
|
||||||
* [Victor Lu](https://github.com/victlu)
|
* [Victor Lu](https://github.com/victlu)
|
||||||
|
|
||||||
|
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
|
||||||
|
|
||||||
### Thanks to all the people who have contributed
|
### Thanks to all the people who have contributed
|
||||||
|
|
||||||
[](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)
|
[](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)
|
||||||
|
|
|
@ -21,6 +21,18 @@
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
|
||||||
|
<PackageReference Include="GitHubActionsTestLogger" />
|
||||||
|
<PackageReference Include="JunitXml.TestLogger" />
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||||
|
<PackageReference Include="xunit" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
|
||||||
|
<Compile Include="$(RepoRoot)\test\Shared\StrongNameTests.cs" Link="StrongNameTests.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Running unit tests from VSCode does not work with .NET SDK 6.0.200 without ProduceReferenceAssemblyInOutDir -->
|
<!-- Running unit tests from VSCode does not work with .NET SDK 6.0.200 without ProduceReferenceAssemblyInOutDir -->
|
||||||
<!-- Related breaking change: https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/write-reference-assemblies-to-obj -->
|
<!-- Related breaking change: https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/write-reference-assemblies-to-obj -->
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
<PackageProjectUrl>https://opentelemetry.io</PackageProjectUrl>
|
<PackageProjectUrl>https://opentelemetry.io</PackageProjectUrl>
|
||||||
<Authors>OpenTelemetry Authors</Authors>
|
<Authors>OpenTelemetry Authors</Authors>
|
||||||
<Copyright>Copyright The OpenTelemetry Authors</Copyright>
|
<Copyright>Copyright The OpenTelemetry Authors</Copyright>
|
||||||
<PackageOutputPath Condition="$(Build_ArtifactStagingDirectory) != ''">$(Build_ArtifactStagingDirectory)</PackageOutputPath>
|
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||||
|
@ -36,16 +35,8 @@
|
||||||
<ContinuousIntegrationBuild Condition="'$(Deterministic)'=='true'">true</ContinuousIntegrationBuild>
|
<ContinuousIntegrationBuild Condition="'$(Deterministic)'=='true'">true</ContinuousIntegrationBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<!-- Note: Disable net6.0 target for package validation because it has been
|
|
||||||
removed. It should be possible to remove this once a stable version has been
|
|
||||||
released to NuGet without net6.0. -->
|
|
||||||
<PackageValidationBaselineFrameworkToIgnore Include="net6.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MinVer" PrivateAssets="All" Condition="'$(IntegrationBuild)' != 'true'" />
|
<PackageReference Include="MinVer" PrivateAssets="All" Condition="'$(IntegrationBuild)' != 'true'" />
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Condition="'$(IntegrationBuild)' != 'true'" />
|
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
|
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
|
||||||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
|
||||||
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
|
|
||||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
@ -14,8 +13,11 @@
|
||||||
<NuGetAuditLevel>low</NuGetAuditLevel>
|
<NuGetAuditLevel>low</NuGetAuditLevel>
|
||||||
<!-- Suppress warnings for repo code using experimental features -->
|
<!-- Suppress warnings for repo code using experimental features -->
|
||||||
<NoWarn>$(NoWarn);OTEL1000;OTEL1001;OTEL1002;OTEL1004</NoWarn>
|
<NoWarn>$(NoWarn);OTEL1000;OTEL1001;OTEL1002;OTEL1004</NoWarn>
|
||||||
<!--temporarily disable. See 3958-->
|
<AnalysisLevel>latest-All</AnalysisLevel>
|
||||||
<!--<AnalysisLevel>latest-All</AnalysisLevel>-->
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(SignAssembly)' == 'true' ">
|
||||||
|
<StrongNamePublicKey>002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898</StrongNamePublicKey>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="BuildFlags">
|
<PropertyGroup Label="BuildFlags">
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
tests:
|
tests:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
tests:
|
tests:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -24,10 +24,9 @@ if ($LastExitCode -ne 0)
|
||||||
Write-Host $publishOutput
|
Write-Host $publishOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
$runtime = $IsWindows ? "win-x64" : ($IsMacOS ? "macos-x64" : "linux-x64")
|
|
||||||
$app = $IsWindows ? "./OpenTelemetry.AotCompatibility.TestApp.exe" : "./OpenTelemetry.AotCompatibility.TestApp"
|
$app = $IsWindows ? "./OpenTelemetry.AotCompatibility.TestApp.exe" : "./OpenTelemetry.AotCompatibility.TestApp"
|
||||||
|
|
||||||
Push-Location $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Release/$targetNetFramework/$runtime
|
Push-Location $rootDirectory/artifacts/publish/OpenTelemetry.AotCompatibility.TestApp/release_$targetNetFramework
|
||||||
|
|
||||||
Write-Host "Executing test App..."
|
Write-Host "Executing test App..."
|
||||||
$app
|
$app
|
||||||
|
|
|
@ -1,22 +1,32 @@
|
||||||
param(
|
param(
|
||||||
[Parameter()][string]$coyoteVersion="1.7.10",
|
[Parameter()][string]$coyoteVersion="1.7.11",
|
||||||
[Parameter(Mandatory=$true)][string]$testProjectName,
|
[Parameter(Mandatory=$true)][string]$testProjectName,
|
||||||
[Parameter(Mandatory=$true)][string]$targetFramework,
|
[Parameter(Mandatory=$true)][string]$targetFramework,
|
||||||
[Parameter()][string]$categoryName="CoyoteConcurrencyTests",
|
[Parameter()][string]$categoryName="CoyoteConcurrencyTests",
|
||||||
[Parameter()][string]$configuration="Release"
|
[Parameter()][string]$configuration="Release"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
$env:OTEL_RUN_COYOTE_TESTS = 'true'
|
$env:OTEL_RUN_COYOTE_TESTS = 'true'
|
||||||
|
|
||||||
$rootDirectory = Get-Location
|
$rootDirectory = Get-Location
|
||||||
|
|
||||||
Write-Host "Install Coyote CLI."
|
Write-Host "Install Coyote CLI."
|
||||||
dotnet tool install --global Microsoft.Coyote.CLI
|
dotnet tool install --global Microsoft.Coyote.CLI --version $coyoteVersion
|
||||||
|
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "Microsoft.Coyote.CLI installation failed with exit code $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "Build $testProjectName project."
|
Write-Host "Build $testProjectName project."
|
||||||
dotnet build "$rootDirectory/test/$testProjectName/$testProjectName.csproj" --configuration $configuration
|
dotnet build "$rootDirectory/test/$testProjectName/$testProjectName.csproj" --configuration $configuration
|
||||||
|
|
||||||
$artifactsPath = Join-Path $rootDirectory "test/$testProjectName/bin/$configuration/$targetFramework"
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "dotnet build failed with exit code $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
|
||||||
|
$artifactsPath = Join-Path $rootDirectory "artifacts/bin/$testProjectName/$($configuration.ToLowerInvariant())_$targetFramework"
|
||||||
|
|
||||||
Write-Host "Generate Coyote rewriting options JSON file."
|
Write-Host "Generate Coyote rewriting options JSON file."
|
||||||
$assemblies = Get-ChildItem $artifactsPath -Filter OpenTelemetry*.dll | ForEach-Object {$_.Name}
|
$assemblies = Get-ChildItem $artifactsPath -Filter OpenTelemetry*.dll | ForEach-Object {$_.Name}
|
||||||
|
@ -29,6 +39,13 @@ $RewriteOptionsJson | ConvertTo-Json -Compress | Set-Content -Path "$rootDirecto
|
||||||
Write-Host "Run Coyote rewrite."
|
Write-Host "Run Coyote rewrite."
|
||||||
coyote rewrite "$rootDirectory/test/$testProjectName/rewrite.coyote.json"
|
coyote rewrite "$rootDirectory/test/$testProjectName/rewrite.coyote.json"
|
||||||
|
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "coyote rewrite failed with exit code $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "Execute re-written binary."
|
Write-Host "Execute re-written binary."
|
||||||
dotnet test "$artifactsPath/$testProjectName.dll" --framework $targetFramework --filter CategoryName=$categoryName
|
dotnet test "$artifactsPath/$testProjectName.dll" --framework $targetFramework --filter CategoryName=$categoryName
|
||||||
|
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "dotnet test failed with exit code $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
<Import Project="$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), '..', 'Directory.Build.props'))" />
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.nonprod.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.nonprod.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>$(TargetFrameworksForDocs)</TargetFrameworks>
|
<TargetFrameworks>$(TargetFrameworksForDocs)</TargetFrameworks>
|
||||||
|
<!-- Opt-out of Artifacts Output for docs as there are duplicated project names -->
|
||||||
|
<UseArtifactsOutput>false</UseArtifactsOutput>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
// Copyright The OpenTelemetry Authors
|
// Copyright The OpenTelemetry Authors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
public struct FoodRecallNotice
|
namespace ComplexObjects;
|
||||||
|
|
||||||
|
internal struct FoodRecallNotice
|
||||||
{
|
{
|
||||||
public string? BrandName { get; set; }
|
public string? BrandName { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright The OpenTelemetry Authors
|
// Copyright The OpenTelemetry Authors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
using ComplexObjects;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using OpenTelemetry.Logs;
|
using OpenTelemetry.Logs;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,9 @@ using OpenTelemetry;
|
||||||
using OpenTelemetry.Logs;
|
using OpenTelemetry.Logs;
|
||||||
using OpenTelemetry.Trace;
|
using OpenTelemetry.Trace;
|
||||||
|
|
||||||
public class Program
|
namespace Correlation;
|
||||||
|
|
||||||
|
internal sealed class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("MyCompany.MyProduct.MyLibrary");
|
private static readonly ActivitySource MyActivitySource = new("MyCompany.MyProduct.MyLibrary");
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ using OpenTelemetry.Logs;
|
||||||
|
|
||||||
namespace DedicatedLogging;
|
namespace DedicatedLogging;
|
||||||
|
|
||||||
public static class DedicatedLoggingServiceCollectionExtensions
|
internal static class DedicatedLoggingServiceCollectionExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddDedicatedLogging(
|
public static IServiceCollection AddDedicatedLogging(
|
||||||
this IServiceCollection services,
|
this IServiceCollection services,
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
namespace DedicatedLogging;
|
namespace DedicatedLogging;
|
||||||
|
|
||||||
public interface IDedicatedLogger : ILogger
|
internal interface IDedicatedLogger : ILogger
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IDedicatedLogger<out TCategoryName> : IDedicatedLogger
|
internal interface IDedicatedLogger<out TCategoryName> : IDedicatedLogger
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA1812;CA2213</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Extensions.Hosting\OpenTelemetry.Extensions.Hosting.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Extensions.Hosting\OpenTelemetry.Extensions.Hosting.csproj" />
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Text;
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
using OpenTelemetry.Logs;
|
using OpenTelemetry.Logs;
|
||||||
|
|
||||||
internal class MyExporter : BaseExporter<LogRecord>
|
internal sealed class MyExporter : BaseExporter<LogRecord>
|
||||||
{
|
{
|
||||||
private readonly string name;
|
private readonly string name;
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ internal class MyExporter : BaseExporter<LogRecord>
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
|
base.Dispose(disposing);
|
||||||
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
using OpenTelemetry.Logs;
|
using OpenTelemetry.Logs;
|
||||||
|
|
||||||
internal class MyProcessor : BaseProcessor<LogRecord>
|
internal sealed class MyProcessor : BaseProcessor<LogRecord>
|
||||||
{
|
{
|
||||||
private readonly string name;
|
private readonly string name;
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ internal class MyProcessor : BaseProcessor<LogRecord>
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
|
base.Dispose(disposing);
|
||||||
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ using OpenTelemetry;
|
||||||
|
|
||||||
namespace ExtendingTheSdk;
|
namespace ExtendingTheSdk;
|
||||||
|
|
||||||
public class Program
|
internal sealed class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
|
@ -29,16 +29,16 @@ public class Program
|
||||||
// logger.LogInformation($"Hello from potato {0.99}.");
|
// logger.LogInformation($"Hello from potato {0.99}.");
|
||||||
|
|
||||||
// structured log with template
|
// structured log with template
|
||||||
logger.LogInformation("Hello from {name} {price}.", "tomato", 2.99);
|
logger.LogInformation("Hello from {Name} {Price}.", "tomato", 2.99);
|
||||||
|
|
||||||
// structured log with strong type
|
// structured log with strong type
|
||||||
logger.LogInformation("{food}", new Food { Name = "artichoke", Price = 3.99 });
|
logger.LogInformation("{Food}", new Food { Name = "artichoke", Price = 3.99 });
|
||||||
|
|
||||||
// structured log with anonymous type
|
// structured log with anonymous type
|
||||||
logger.LogInformation("{food}", new { Name = "pumpkin", Price = 5.99 });
|
logger.LogInformation("{Food}", new { Name = "pumpkin", Price = 5.99 });
|
||||||
|
|
||||||
// structured log with general type
|
// structured log with general type
|
||||||
logger.LogInformation("{food}", new Dictionary<string, object>
|
logger.LogInformation("{Food}", new Dictionary<string, object>
|
||||||
{
|
{
|
||||||
["Name"] = "truffle",
|
["Name"] = "truffle",
|
||||||
["Price"] = 299.99,
|
["Price"] = 299.99,
|
||||||
|
@ -48,11 +48,11 @@ public class Program
|
||||||
using (logger.BeginScope("[operation]"))
|
using (logger.BeginScope("[operation]"))
|
||||||
using (logger.BeginScope("[hardware]"))
|
using (logger.BeginScope("[hardware]"))
|
||||||
{
|
{
|
||||||
logger.LogError("{name} is broken.", "refrigerator");
|
logger.LogError("{Name} is broken.", "refrigerator");
|
||||||
}
|
}
|
||||||
|
|
||||||
// message will be redacted by MyRedactionProcessor
|
// message will be redacted by MyRedactionProcessor
|
||||||
logger.LogInformation("OpenTelemetry {sensitiveString}.", "<secret>");
|
logger.LogInformation("OpenTelemetry {SensitiveString}.", "<secret>");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal struct Food
|
internal struct Food
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA2000;CA1848;CA1510;CA1305</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA2213;CA1812;CA1307</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -8,7 +8,7 @@ using OpenTelemetry.Resources;
|
||||||
|
|
||||||
namespace CustomizingTheSdk;
|
namespace CustomizingTheSdk;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly Meter Meter1 = new("CompanyA.ProductA.Library1", "1.0");
|
private static readonly Meter Meter1 = new("CompanyA.ProductA.Library1", "1.0");
|
||||||
private static readonly Meter Meter2 = new("CompanyA.ProductB.Library2", "1.0");
|
private static readonly Meter Meter2 = new("CompanyA.ProductB.Library2", "1.0");
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA5394</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -8,7 +8,9 @@ using OpenTelemetry.Exporter;
|
||||||
using OpenTelemetry.Metrics;
|
using OpenTelemetry.Metrics;
|
||||||
using OpenTelemetry.Trace;
|
using OpenTelemetry.Trace;
|
||||||
|
|
||||||
public class Program
|
namespace Exemplars;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("OpenTelemetry.Demo.Exemplar");
|
private static readonly ActivitySource MyActivitySource = new("OpenTelemetry.Demo.Exemplar");
|
||||||
private static readonly Meter MyMeter = new("OpenTelemetry.Demo.Exemplar");
|
private static readonly Meter MyMeter = new("OpenTelemetry.Demo.Exemplar");
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA5394</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.OpenTelemetryProtocol\OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.OpenTelemetryProtocol\OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Text;
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
using OpenTelemetry.Metrics;
|
using OpenTelemetry.Metrics;
|
||||||
|
|
||||||
internal class MyExporter : BaseExporter<Metric>
|
internal sealed class MyExporter : BaseExporter<Metric>
|
||||||
{
|
{
|
||||||
private readonly string name;
|
private readonly string name;
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ internal class MyExporter : BaseExporter<Metric>
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
|
base.Dispose(disposing);
|
||||||
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ using OpenTelemetry.Metrics;
|
||||||
|
|
||||||
namespace ExtendingTheSdk;
|
namespace ExtendingTheSdk;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
||||||
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");
|
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA2000;CA1510;CA1305</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -5,7 +5,9 @@ using System.Diagnostics.Metrics;
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
using OpenTelemetry.Metrics;
|
using OpenTelemetry.Metrics;
|
||||||
|
|
||||||
public class Program
|
namespace GettingStartedConsole;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
||||||
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");
|
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");
|
||||||
|
|
|
@ -6,7 +6,9 @@ using OpenTelemetry;
|
||||||
using OpenTelemetry.Exporter;
|
using OpenTelemetry.Exporter;
|
||||||
using OpenTelemetry.Metrics;
|
using OpenTelemetry.Metrics;
|
||||||
|
|
||||||
public class Program
|
namespace GettingStartedPrometheusGrafana;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
||||||
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");
|
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");
|
||||||
|
|
|
@ -8,7 +8,7 @@ using OpenTelemetry.Metrics;
|
||||||
|
|
||||||
namespace LearningMoreInstruments;
|
namespace LearningMoreInstruments;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
|
||||||
private static readonly Histogram<long> MyHistogram = MyMeter.CreateHistogram<long>("MyHistogram");
|
private static readonly Histogram<long> MyHistogram = MyMeter.CreateHistogram<long>("MyHistogram");
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA5394</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace ExtendingTheSdk;
|
||||||
|
|
||||||
|
internal static partial class LoggerExtensions
|
||||||
|
{
|
||||||
|
[LoggerMessage(LogLevel.Information, "Hello from {Name} {Price}")]
|
||||||
|
public static partial void HelloFrom(this ILogger logger, string name, double price);
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using OpenTelemetry.Resources;
|
using OpenTelemetry.Resources;
|
||||||
|
|
||||||
internal class MyResourceDetector : IResourceDetector
|
internal sealed class MyResourceDetector : IResourceDetector
|
||||||
{
|
{
|
||||||
public Resource Detect()
|
public Resource Detect()
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace ExtendingTheSdk;
|
namespace ExtendingTheSdk;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource DemoSource = new("OTel.Demo");
|
private static readonly ActivitySource DemoSource = new("OTel.Demo");
|
||||||
private static readonly Meter MeterDemoSource = new("OTel.Demo");
|
private static readonly Meter MeterDemoSource = new("OTel.Demo");
|
||||||
|
@ -55,7 +55,6 @@ public class Program
|
||||||
}
|
}
|
||||||
|
|
||||||
var logger = loggerFactory.CreateLogger("OTel.Demo");
|
var logger = loggerFactory.CreateLogger("OTel.Demo");
|
||||||
logger
|
logger.HelloFrom("tomato", 2.99);
|
||||||
.LogInformation("Hello from {Name} {Price}", "tomato", 2.99);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace CustomizingTheSdk;
|
namespace CustomizingTheSdk;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyLibraryActivitySource = new(
|
private static readonly ActivitySource MyLibraryActivitySource = new(
|
||||||
"MyCompany.MyProduct.MyLibrary");
|
"MyCompany.MyProduct.MyLibrary");
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
|
|
||||||
internal class MyEnrichingProcessor : BaseProcessor<Activity>
|
internal sealed class MyEnrichingProcessor : BaseProcessor<Activity>
|
||||||
{
|
{
|
||||||
public override void OnEnd(Activity activity)
|
public override void OnEnd(Activity activity)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
|
|
||||||
internal class MyExporter : BaseExporter<Activity>
|
internal sealed class MyExporter : BaseExporter<Activity>
|
||||||
{
|
{
|
||||||
private readonly string name;
|
private readonly string name;
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ internal class MyExporter : BaseExporter<Activity>
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
|
base.Dispose(disposing);
|
||||||
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
|
|
||||||
internal class MyProcessor : BaseProcessor<Activity>
|
internal sealed class MyProcessor : BaseProcessor<Activity>
|
||||||
{
|
{
|
||||||
private readonly string name;
|
private readonly string name;
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ internal class MyProcessor : BaseProcessor<Activity>
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
|
base.Dispose(disposing);
|
||||||
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
Console.WriteLine($"{this.name}.Dispose({disposing})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using OpenTelemetry.Resources;
|
using OpenTelemetry.Resources;
|
||||||
|
|
||||||
internal class MyResourceDetector : IResourceDetector
|
internal sealed class MyResourceDetector : IResourceDetector
|
||||||
{
|
{
|
||||||
public Resource Detect()
|
public Resource Detect()
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using OpenTelemetry.Trace;
|
using OpenTelemetry.Trace;
|
||||||
|
|
||||||
internal class MySampler : Sampler
|
internal sealed class MySampler : Sampler
|
||||||
{
|
{
|
||||||
public override SamplingResult ShouldSample(in SamplingParameters param)
|
public override SamplingResult ShouldSample(in SamplingParameters param)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace ExtendingTheSdk;
|
namespace ExtendingTheSdk;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource DemoSource = new("OTel.Demo");
|
private static readonly ActivitySource DemoSource = new("OTel.Demo");
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA2000;CA1812;CA1510</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -5,7 +5,9 @@ using System.Diagnostics;
|
||||||
using OpenTelemetry;
|
using OpenTelemetry;
|
||||||
using OpenTelemetry.Trace;
|
using OpenTelemetry.Trace;
|
||||||
|
|
||||||
public class Program
|
namespace GettingStartedConsole;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("MyCompany.MyProduct.MyLibrary");
|
private static readonly ActivitySource MyActivitySource = new("MyCompany.MyProduct.MyLibrary");
|
||||||
|
|
||||||
|
@ -18,9 +20,10 @@ public class Program
|
||||||
|
|
||||||
using (var activity = MyActivitySource.StartActivity("SayHello"))
|
using (var activity = MyActivitySource.StartActivity("SayHello"))
|
||||||
{
|
{
|
||||||
|
int[] intArray = [1, 2, 3];
|
||||||
activity?.SetTag("foo", 1);
|
activity?.SetTag("foo", 1);
|
||||||
activity?.SetTag("bar", "Hello, World!");
|
activity?.SetTag("bar", "Hello, World!");
|
||||||
activity?.SetTag("baz", new int[] { 1, 2, 3 });
|
activity?.SetTag("baz", intArray);
|
||||||
activity?.SetStatus(ActivityStatusCode.Ok);
|
activity?.SetStatus(ActivityStatusCode.Ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace GettingStartedJaeger;
|
namespace GettingStartedJaeger;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("OpenTelemetry.Demo.Jaeger");
|
private static readonly ActivitySource MyActivitySource = new("OpenTelemetry.Demo.Jaeger");
|
||||||
|
|
||||||
|
@ -33,13 +33,13 @@ public class Program
|
||||||
{
|
{
|
||||||
using (var slow = MyActivitySource.StartActivity("SomethingSlow"))
|
using (var slow = MyActivitySource.StartActivity("SomethingSlow"))
|
||||||
{
|
{
|
||||||
await client.GetStringAsync("https://httpstat.us/200?sleep=1000");
|
await client.GetStringAsync(new Uri("https://httpstat.us/200?sleep=1000")).ConfigureAwait(false);
|
||||||
await client.GetStringAsync("https://httpstat.us/200?sleep=1000");
|
await client.GetStringAsync(new Uri("https://httpstat.us/200?sleep=1000")).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var fast = MyActivitySource.StartActivity("SomethingFast"))
|
using (var fast = MyActivitySource.StartActivity("SomethingFast"))
|
||||||
{
|
{
|
||||||
await client.GetStringAsync("https://httpstat.us/301");
|
await client.GetStringAsync(new Uri("https://httpstat.us/301")).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace LinksAndParentBasedSamplerExample;
|
||||||
/// links based sampler. If either of these samplers decide to sample,
|
/// links based sampler. If either of these samplers decide to sample,
|
||||||
/// this composite sampler decides to sample.
|
/// this composite sampler decides to sample.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class LinksAndParentBasedSampler : Sampler
|
internal sealed class LinksAndParentBasedSampler : Sampler
|
||||||
{
|
{
|
||||||
private readonly ParentBasedSampler parentBasedSampler;
|
private readonly ParentBasedSampler parentBasedSampler;
|
||||||
private readonly LinksBasedSampler linksBasedSampler;
|
private readonly LinksBasedSampler linksBasedSampler;
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace LinksAndParentBasedSamplerExample;
|
||||||
/// A non-probabilistic sampler that samples an activity if ANY of the linked activities
|
/// A non-probabilistic sampler that samples an activity if ANY of the linked activities
|
||||||
/// is sampled.
|
/// is sampled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class LinksBasedSampler : Sampler
|
internal sealed class LinksBasedSampler : Sampler
|
||||||
{
|
{
|
||||||
public override SamplingResult ShouldSample(in SamplingParameters samplingParameters)
|
public override SamplingResult ShouldSample(in SamplingParameters samplingParameters)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace LinksAndParentBasedSamplerExample;
|
namespace LinksAndParentBasedSamplerExample;
|
||||||
|
|
||||||
internal class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("LinksAndParentBasedSampler.Example");
|
private static readonly ActivitySource MyActivitySource = new("LinksAndParentBasedSampler.Example");
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ internal class Program
|
||||||
/// Generates a list of activity links. A linked activity is sampled with a probability of 0.1.
|
/// Generates a list of activity links. A linked activity is sampled with a probability of 0.1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A list of links.</returns>
|
/// <returns>A list of links.</returns>
|
||||||
private static IEnumerable<ActivityLink> GetActivityLinks(int seed)
|
private static List<ActivityLink> GetActivityLinks(int seed)
|
||||||
{
|
{
|
||||||
var random = new Random(seed);
|
var random = new Random(seed);
|
||||||
var linkedActivitiesList = new List<ActivityLink>();
|
var linkedActivitiesList = new List<ActivityLink>();
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA5394</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace LinksCreationWithNewRootActivitiesDemo;
|
namespace LinksCreationWithNewRootActivitiesDemo;
|
||||||
|
|
||||||
internal class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("LinksCreationWithNewRootActivities");
|
private static readonly ActivitySource MyActivitySource = new("LinksCreationWithNewRootActivities");
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ internal class Program
|
||||||
using (var activity = MyActivitySource.StartActivity("OrchestratingActivity"))
|
using (var activity = MyActivitySource.StartActivity("OrchestratingActivity"))
|
||||||
{
|
{
|
||||||
activity?.SetTag("foo", 1);
|
activity?.SetTag("foo", 1);
|
||||||
await DoFanoutAsync();
|
await DoFanoutAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
using (var nestedActivity = MyActivitySource.StartActivity("WrapUp"))
|
using (var nestedActivity = MyActivitySource.StartActivity("WrapUp"))
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ internal class Program
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for all tasks to complete
|
// Wait for all tasks to complete
|
||||||
await Task.WhenAll(tasks);
|
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||||
|
|
||||||
// Reset to the previous activity now that we are done with the fanout
|
// Reset to the previous activity now that we are done with the fanout
|
||||||
// This will ensure that the rest of the code executes in the context of the original activity.
|
// This will ensure that the rest of the code executes in the context of the original activity.
|
||||||
|
|
|
@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace ReportingExceptions;
|
namespace ReportingExceptions;
|
||||||
|
|
||||||
public class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new(
|
private static readonly ActivitySource MyActivitySource = new(
|
||||||
"MyCompany.MyProduct.MyLibrary");
|
"MyCompany.MyProduct.MyLibrary");
|
||||||
|
@ -27,7 +27,7 @@ public class Program
|
||||||
{
|
{
|
||||||
using (MyActivitySource.StartActivity("Bar"))
|
using (MyActivitySource.StartActivity("Bar"))
|
||||||
{
|
{
|
||||||
throw new Exception("Oops!");
|
throw new InvalidOperationException("Oops!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace StratifiedSamplingByQueryTypeDemo;
|
namespace StratifiedSamplingByQueryTypeDemo;
|
||||||
|
|
||||||
internal class Program
|
internal sealed class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("StratifiedSampling.POC");
|
private static readonly ActivitySource MyActivitySource = new("StratifiedSampling.POC");
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace StratifiedSamplingByQueryTypeDemo;
|
namespace StratifiedSamplingByQueryTypeDemo;
|
||||||
|
|
||||||
internal class StratifiedSampler : Sampler
|
internal sealed class StratifiedSampler : Sampler
|
||||||
{
|
{
|
||||||
// For this POC, we have two groups.
|
// For this POC, we have two groups.
|
||||||
// 0 is the group corresponding to user-initiated queries where we want a 100% sampling rate.
|
// 0 is the group corresponding to user-initiated queries where we want a 100% sampling rate.
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA5394</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace SDKBasedSpanLevelTailSamplingSample;
|
||||||
/// changed later by a span processor based on span attributes (e.g., failure) that become
|
/// changed later by a span processor based on span attributes (e.g., failure) that become
|
||||||
/// available only by the end of the span.
|
/// available only by the end of the span.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class ParentBasedElseAlwaysRecordSampler : Sampler
|
internal sealed class ParentBasedElseAlwaysRecordSampler : Sampler
|
||||||
{
|
{
|
||||||
private const double DefaultSamplingProbabilityForRootSpan = 0.1;
|
private const double DefaultSamplingProbabilityForRootSpan = 0.1;
|
||||||
private readonly ParentBasedSampler parentBasedSampler;
|
private readonly ParentBasedSampler parentBasedSampler;
|
||||||
|
|
|
@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
|
||||||
|
|
||||||
namespace SDKBasedSpanLevelTailSamplingSample;
|
namespace SDKBasedSpanLevelTailSamplingSample;
|
||||||
|
|
||||||
internal class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
private static readonly ActivitySource MyActivitySource = new("SDK.TailSampling.POC");
|
private static readonly ActivitySource MyActivitySource = new("SDK.TailSampling.POC");
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ internal sealed class TailSamplingProcessor : BaseProcessor<Activity>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.IncludeForExportIfFailedActivity(activity);
|
IncludeForExportIfFailedActivity(activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
base.OnEnd(activity);
|
base.OnEnd(activity);
|
||||||
|
@ -42,7 +42,7 @@ internal sealed class TailSamplingProcessor : BaseProcessor<Activity>
|
||||||
// 2. Traces will not be complete: Since this sampling is at a span level, the generated trace will be partial and won't be complete.
|
// 2. Traces will not be complete: Since this sampling is at a span level, the generated trace will be partial and won't be complete.
|
||||||
// For example, if another part of the call tree is successful, those spans may not be sampled in leading to a partial trace.
|
// For example, if another part of the call tree is successful, those spans may not be sampled in leading to a partial trace.
|
||||||
// 3. If multiple exporters are used, this decision will impact all of them: https://github.com/open-telemetry/opentelemetry-dotnet/issues/3861.
|
// 3. If multiple exporters are used, this decision will impact all of them: https://github.com/open-telemetry/opentelemetry-dotnet/issues/3861.
|
||||||
private void IncludeForExportIfFailedActivity(Activity activity)
|
private static void IncludeForExportIfFailedActivity(Activity activity)
|
||||||
{
|
{
|
||||||
if (activity.Status == ActivityStatusCode.Error)
|
if (activity.Status == ActivityStatusCode.Error)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);CA5394;CA2000</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
||||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
|
||||||
<NoWarn>$(NoWarn);CA1515</NoWarn>
|
<NoWarn>$(NoWarn);CA1515</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
version: "3"
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# OTEL Collector to receive logs, metrics and traces from the application
|
# OTEL Collector to receive logs, metrics and traces from the application
|
||||||
|
|
|
@ -6,7 +6,9 @@ distributor:
|
||||||
otlp:
|
otlp:
|
||||||
protocols:
|
protocols:
|
||||||
http:
|
http:
|
||||||
|
endpoint: 0.0.0.0:4318
|
||||||
grpc:
|
grpc:
|
||||||
|
endpoint: 0.0.0.0:4317
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
trace:
|
trace:
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
||||||
<NoWarn>$(NoWarn),CA1812</NoWarn>
|
<NoWarn>$(NoWarn),CA1812</NoWarn>
|
||||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
<Import Project="$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), '..', 'Directory.Build.props'))" />
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.nonprod.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.nonprod.props" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
||||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
||||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
ARG SDK_VERSION=9.0
|
ARG SDK_VERSION=9.0
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0.408@sha256:1875fc5f4be6211c22c4353aafd6b13279c0175f277fbfa53d52375d99e8a9b8 AS dotnet-sdk-8.0
|
FROM mcr.microsoft.com/dotnet/sdk:8.0.413@sha256:7fd287cec03e027e39be13fb06ca1347f1338c7a6ab4ad305d94d91852693f70 AS dotnet-sdk-8.0
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:9.0.203@sha256:9b0a4330cb3dac23ebd6df76ab4211ec5903907ad2c1ccde16a010bf25f8dfde AS dotnet-sdk-9.0
|
FROM mcr.microsoft.com/dotnet/sdk:9.0.304@sha256:ae000be75dac94fc40e00f0eee903289e985995cc06dac3937469254ce5b60b6 AS dotnet-sdk-9.0
|
||||||
|
|
||||||
FROM dotnet-sdk-${SDK_VERSION} AS build
|
FROM dotnet-sdk-${SDK_VERSION} AS build
|
||||||
ARG PUBLISH_CONFIGURATION=Release
|
ARG PUBLISH_CONFIGURATION=Release
|
||||||
|
@ -9,8 +9,8 @@ WORKDIR /app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish ./examples/MicroserviceExample/WebApi -c "${PUBLISH_CONFIGURATION}" -f "${PUBLISH_FRAMEWORK}" -o /out -p:IntegrationBuild=true
|
RUN dotnet publish ./examples/MicroserviceExample/WebApi -c "${PUBLISH_CONFIGURATION}" -f "${PUBLISH_FRAMEWORK}" -o /out -p:IntegrationBuild=true
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0.15@sha256:ab605d8d1b0886af2ef4bbaf5167fbe237670b6fd9829a05c4d08406afdd985e AS dotnet-aspnet-8.0
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0.19@sha256:6d40ae71165cb8a4427477ae3b447b05c080330cabae08b0dae672552bcd34d8 AS dotnet-aspnet-8.0
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0.4@sha256:c3aee4ea4f51369d1f906b4dbd19b0f74fd34399e5ef59f91b70fcd332f36566 AS dotnet-aspnet-9.0
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0.8@sha256:515c08e27cf8d933af442f0e1b6c92cc728acb71f113ca529f56c79cb597adb5 AS dotnet-aspnet-9.0
|
||||||
|
|
||||||
FROM dotnet-aspnet-${SDK_VERSION} AS runtime
|
FROM dotnet-aspnet-${SDK_VERSION} AS runtime
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
||||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
|
||||||
<NoWarn>$(NoWarn);CA1515</NoWarn>
|
<NoWarn>$(NoWarn);CA1515</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
ARG SDK_VERSION=9.0
|
ARG SDK_VERSION=9.0
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0.408@sha256:1875fc5f4be6211c22c4353aafd6b13279c0175f277fbfa53d52375d99e8a9b8 AS dotnet-sdk-8.0
|
FROM mcr.microsoft.com/dotnet/sdk:8.0.413@sha256:45e41fe52eb60f42bd75c83b7e8bfff0523e031e042b4c1fc7ddb9c348898c64 AS dotnet-sdk-8.0
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:9.0.203@sha256:9b0a4330cb3dac23ebd6df76ab4211ec5903907ad2c1ccde16a010bf25f8dfde AS dotnet-sdk-9.0
|
FROM mcr.microsoft.com/dotnet/sdk:9.0.304@sha256:840f3b62b9742dde4461a3c31e38ffd34d41d7d33afd39c378cfcfd5dcb82bd5 AS dotnet-sdk-9.0
|
||||||
|
|
||||||
FROM dotnet-sdk-${SDK_VERSION} AS build
|
FROM dotnet-sdk-${SDK_VERSION} AS build
|
||||||
ARG PUBLISH_CONFIGURATION=Release
|
ARG PUBLISH_CONFIGURATION=Release
|
||||||
|
@ -10,8 +10,8 @@ WORKDIR /app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish ./examples/MicroserviceExample/WorkerService -c "${PUBLISH_CONFIGURATION}" -f "${PUBLISH_FRAMEWORK}" -o /out -p:IntegrationBuild=true
|
RUN dotnet publish ./examples/MicroserviceExample/WorkerService -c "${PUBLISH_CONFIGURATION}" -f "${PUBLISH_FRAMEWORK}" -o /out -p:IntegrationBuild=true
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0.15@sha256:ab605d8d1b0886af2ef4bbaf5167fbe237670b6fd9829a05c4d08406afdd985e AS dotnet-aspnet-8.0
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0.19@sha256:6d8901fae2d8f44c0e73962046a67fbdaf017bc8a6833c74ae87e9fbd0810b73 AS dotnet-aspnet-8.0
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0.4@sha256:c3aee4ea4f51369d1f906b4dbd19b0f74fd34399e5ef59f91b70fcd332f36566 AS dotnet-aspnet-9.0
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0.8@sha256:2b70ef1451cb01c2118969ad15fd0ae40fdbac158f09699fefae0dc32c4ca352 AS dotnet-aspnet-9.0
|
||||||
|
|
||||||
FROM dotnet-aspnet-${SDK_VERSION} AS runtime
|
FROM dotnet-aspnet-${SDK_VERSION} AS runtime
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
|
||||||
<AnalysisLevel>latest-all</AnalysisLevel>
|
|
||||||
<NoWarn>$(NoWarn);CA1812</NoWarn>
|
<NoWarn>$(NoWarn);CA1812</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
zipkin:
|
zipkin:
|
||||||
image: openzipkin/zipkin
|
image: openzipkin/zipkin
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue