Skip to content

Commit

Permalink
Merge branch 'main' into vibankwa/aspnetcore-perf-summary
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishwesh Bankwar committed Dec 13, 2023
2 parents b241821 + a736574 commit eca8eb3
Show file tree
Hide file tree
Showing 718 changed files with 1,893 additions and 9,807 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-pr-message: 'This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.'
close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.'
Expand Down
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="[17.8.0,18.0.0)" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="[1.1.1,2.0)" />
<PackageVersion Include="MinVer" Version="[4.3.0,5.0)" />
<PackageVersion Include="Moq" Version="[4.18.4,5.0)" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="[1.5.1,2.0)" />
<PackageVersion Include="RabbitMQ.Client" Version="[6.6.0,7.0)" />
<PackageVersion Include="StyleCop.Analyzers" Version="[1.2.0-beta.507,2.0)" />
Expand Down
19 changes: 17 additions & 2 deletions OpenTelemetry.sln
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E
build\docfx.cmd = build\docfx.cmd
build\docker-compose.net6.0.yml = build\docker-compose.net6.0.yml
build\docker-compose.net7.0.yml = build\docker-compose.net7.0.yml
build\docker-compose.net8.0.yml = build\docker-compose.net8.0.yml
build\finalize-publicapi.ps1 = build\finalize-publicapi.ps1
build\GlobalAttrExclusions.txt = build\GlobalAttrExclusions.txt
build\opentelemetry-icon-color.png = build\opentelemetry-icon-color.png
Expand Down Expand Up @@ -92,8 +91,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
ProjectSection(SolutionItems) = preProject
.github\workflows\ci-aot-md.yml = .github\workflows\ci-aot-md.yml
.github\workflows\ci-aot.yml = .github\workflows\ci-aot.yml
.github\workflows\ci-concurrency.yml = .github\workflows\ci-concurrency.yml
.github\workflows\ci-concurrency-md.yml = .github\workflows\ci-concurrency-md.yml
.github\workflows\ci-concurrency.yml = .github\workflows\ci-concurrency.yml
.github\workflows\ci-instrumentation-libraries-md.yml = .github\workflows\ci-instrumentation-libraries-md.yml
.github\workflows\ci-instrumentation-libraries.yml = .github\workflows\ci-instrumentation-libraries.yml
.github\workflows\ci-md.yml = .github\workflows\ci-md.yml
Expand Down Expand Up @@ -266,6 +265,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A49299
ProjectSection(SolutionItems) = preProject
src\Shared\ActivityHelperExtensions.cs = src\Shared\ActivityHelperExtensions.cs
src\Shared\ActivityInstrumentationHelper.cs = src\Shared\ActivityInstrumentationHelper.cs
src\Shared\DiagnosticDefinitions.cs = src\Shared\DiagnosticDefinitions.cs
src\Shared\ExceptionExtensions.cs = src\Shared\ExceptionExtensions.cs
src\Shared\Guard.cs = src\Shared\Guard.cs
src\Shared\HttpSemanticConventionHelper.cs = src\Shared\HttpSemanticConventionHelper.cs
Expand Down Expand Up @@ -323,6 +323,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "getting-started-aspnetcore"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "links-creation", "docs\trace\links-creation-with-new-activities\links-creation.csproj", "{B4856711-6D4C-4246-A686-49458D4C1301}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "diagnostics", "diagnostics", "{52AF6D7D-9E66-4234-9A2C-5D16C6F22B40}"
ProjectSection(SolutionItems) = preProject
docs\diagnostics\README.md = docs\diagnostics\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "experimental-apis", "experimental-apis", "{17A22B0E-6EC3-4A39-B955-0A486AD06699}"
ProjectSection(SolutionItems) = preProject
docs\diagnostics\experimental-apis\OTEL1000.md = docs\diagnostics\experimental-apis\OTEL1000.md
docs\diagnostics\experimental-apis\OTEL1001.md = docs\diagnostics\experimental-apis\OTEL1001.md
docs\diagnostics\experimental-apis\OTEL1002.md = docs\diagnostics\experimental-apis\OTEL1002.md
docs\diagnostics\experimental-apis\README.md = docs\diagnostics\experimental-apis\README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -650,6 +663,8 @@ Global
{1C459B5B-C702-46FF-BF1A-EE795E420FFA} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
{99B4D965-8782-4694-8DFA-B7A3630CEF60} = {3862190B-E2C5-418E-AFDC-DB281FB5C705}
{B4856711-6D4C-4246-A686-49458D4C1301} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
{52AF6D7D-9E66-4234-9A2C-5D16C6F22B40} = {7C87CAF9-79D7-4C26-9FFB-F3F1FB6911F1}
{17A22B0E-6EC3-4A39-B955-0A486AD06699} = {52AF6D7D-9E66-4234-9A2C-5D16C6F22B40}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {55639B5C-0770-4A22-AB56-859604650521}
Expand Down
2 changes: 2 additions & 0 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Suppress warnings for repo code using experimental features -->
<NoWarn>$(NoWarn);OTEL1000;OTEL1001;OTEL1002</NoWarn>
<!--temporarily disable. See 3958-->
<!--<AnalysisLevel>latest-All</AnalysisLevel>-->
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions build/stylecop.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"documentationRules": {
"companyName": "OpenTelemetry Authors",
"copyrightText": "Copyright The OpenTelemetry Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License."
"copyrightText": "Copyright The OpenTelemetry Authors\nSPDX-License-Identifier: Apache-2.0",
"xmlHeader": false
},
"orderingRules": {
"usingDirectivesPlacement": "outsideNamespace"
Expand Down
23 changes: 23 additions & 0 deletions docs/diagnostics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenTelemetry Diagnostics

This document describes the diagnostic categories used in OpenTelemetry .NET
components. Diagnostics are used by the compiler to report information to users
about experimental and/or obsolete code being invoked or to suggest improvements
to specific code patterns identified through static analysis.

## Experimental APIs

Range: OTEL1XXX

Experimental APIs exposed in OpenTelemetry .NET pre-relase builds. APIs are
exposed experimentally when either the OpenTelemetry Specification has
explicitly marked some feature as
[experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/document-status.md)
or when the SIG members are still working through the design for a feature and
want to solicit feedback from the community.

> **Note** Experimental APIs are exposed as `public` in pre-release builds and
> `internal` in stable builds.
For defined diagnostics see: [OpenTelemetry .NET Experimental
APIs](./experimental-apis/README.md)
42 changes: 42 additions & 0 deletions docs/diagnostics/experimental-apis/OTEL1000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# OpenTelemetry .NET Diagnostic: OTEL1000

## Overview

This is an Experimental API diagnostic covering the following APIs:

* `LoggerProviderBuilder`
* `LoggerProvider`
* `IDeferredLoggerProviderBuilder`

Experimental APIs may be changed or removed in the future.

## Details

The OpenTelemetry Specification defines a `LoggerProvider` as part of its
[API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md)
&
[SDK](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md)
components.

The SDK allows calling `Shutdown` and `ForceFlush` on the `LoggerProvider` and
also allows processors to be added dynamically to a pipeline after its creation.

Today the OpenTelemetry .NET log pipeline is built on top of the
Microsoft.Extensions.Logging `ILogger` \ `ILoggerProvider` \ `ILoggerFactory`
APIs which do not expose such features.

We also have an issue with the `ILoggingBuilder.AddOpenTelemetry` API in that it
interacts with the `OpenTelemetryLoggerOptions` class. Options classes are NOT
available until the `IServiceProvider` is available and services can no longer
be registered at that point. This prevents the current logging pipeline from
exposing the same dependency injection surface we have for traces and metrics.

We are exposing these APIs to solve these issues and gather feedback about their
usefulness.

## Logs Bridge API

The OpenTelemetry Specification defines a Logs Bridge API which is rooted off of
the `LoggerProvider` (`GetLogger`) and exposes a `Logger` API to submit log
records. See [OTEL1001](./OTEL1001.md) for details about the Logs Bridge API
implementation status.
35 changes: 35 additions & 0 deletions docs/diagnostics/experimental-apis/OTEL1001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# OpenTelemetry .NET Diagnostic: OTEL1001

## Overview

This is an Experimental API diagnostic covering the following APIs:

* `LoggerProvider.GetLogger`
* `Logger`
* `LogRecordAttributeList`
* `LogRecordData`
* `LogRecordSeverity`

Experimental APIs may be changed or removed in the future.

## Details

The OpenTelemetry Specification defines a [Logs Bridge
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md).

The Logs Bridge API is used by library authors to build log appenders which
route messages from different log frameworks into OpenTelemetry.

Today the OpenTelemetry .NET log pipeline is built on top of the
Microsoft.Extensions.Logging `ILogger` \ `ILoggerProvider` \ `ILoggerFactory`
APIs.

We are exposing these APIs gather feedback about their usefulness. An
alternative approach may be taken which would be to append into `ILogger`
instead of OpenTelemetry directly.

## LoggerProvider API

The OpenTelemetry Specification defines a `LoggerProvider` API. See
[OTEL1000](./OTEL1000.md) for details about the `LoggerProvider` implementation
status.
30 changes: 30 additions & 0 deletions docs/diagnostics/experimental-apis/OTEL1002.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# OpenTelemetry .NET Diagnostic: OTEL1002

## Overview

This is an Experimental API diagnostic covering the following APIs:

* `AlwaysOnExemplarFilter`
* `AlwaysOffExemplarFilter`
* `Exemplar`
* `ExemplarFilter`
* `MeterProviderBuilder.SetExemplarFilter` extension method
* `TraceBasedExemplarFilter`

Experimental APIs may be changed or removed in the future.

## Details

The OpenTelemetry Specification defines an [Exemplar
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar)
in the Metrics SDK.

From the specification:

> Exemplars are example data points for aggregated data. They provide specific
> context to otherwise general aggregations. Exemplars allow correlation between
> aggregated metric data and the original API calls where measurements are
> recorded.
We are exposing these APIs experimentally until the specification declares them
stable.
48 changes: 48 additions & 0 deletions docs/diagnostics/experimental-apis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# OpenTelemetry .NET Experimental APIs

This document describes experimental APIs exposed in OpenTelemetry .NET
pre-relase builds. APIs are exposed experimentally when either the OpenTelemetry
Specification has explicitly marked some feature as
[experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/document-status.md)
or when the SIG members are still working through the design for a feature and
want to solicit feedback from the community.

> **Note**
> Experimental APIs are exposed as `public` in pre-release builds and `internal`
> in stable builds.
## Active

Experimental APIs available in the pre-release builds:

### OTEL1000

Description: `LoggerProvider` and `LoggerProviderBuilder`

Details: [OTEL1000](./OTEL1000.md)

### OTEL1001

Description: Logs Bridge API

Details: [OTEL1001](./OTEL1001.md)

### OTEL1002

Description: Metrics Exemplar Support

Details: [OTEL1002](./OTEL1002.md)

## Inactive

Experimental APIs which have been released stable or removed:

<!-- When an experimental API is released or removed:
1) Move the section from above down here.
2) Delete the individual file from the repo and switch the link here to a
permalink to the last version.
3) Add the version info for when the API was released stable or removed. If
removed add details for alternative solution or reasoning.
-->

None
15 changes: 1 addition & 14 deletions docs/logs/correlation/Program.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
// <copyright file="Program.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// SPDX-License-Identifier: Apache-2.0

using System.Diagnostics;
using Microsoft.Extensions.Logging;
Expand Down
15 changes: 1 addition & 14 deletions docs/logs/customizing-the-sdk/Program.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
// <copyright file="Program.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// SPDX-License-Identifier: Apache-2.0

using Microsoft.Extensions.Logging;
using OpenTelemetry.Logs;
Expand Down
15 changes: 1 addition & 14 deletions docs/logs/extending-the-sdk/LoggerExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
// <copyright file="LoggerExtensions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// SPDX-License-Identifier: Apache-2.0

using OpenTelemetry;
using OpenTelemetry.Logs;
Expand Down
15 changes: 1 addition & 14 deletions docs/logs/extending-the-sdk/MyExporter.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
// <copyright file="MyExporter.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// SPDX-License-Identifier: Apache-2.0

using System.Text;
using OpenTelemetry;
Expand Down
15 changes: 1 addition & 14 deletions docs/logs/extending-the-sdk/MyProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
// <copyright file="MyProcessor.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// SPDX-License-Identifier: Apache-2.0

using OpenTelemetry;
using OpenTelemetry.Logs;
Expand Down
15 changes: 1 addition & 14 deletions docs/logs/extending-the-sdk/Program.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
// <copyright file="Program.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// SPDX-License-Identifier: Apache-2.0

using Microsoft.Extensions.Logging;
using OpenTelemetry;
Expand Down
Loading

0 comments on commit eca8eb3

Please sign in to comment.