-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// <copyright file="InstrumentationOptions.cs" company="OpenTelemetry Authors"> | ||
Check warning on line 1 in docs/trace/getting-started-aspnetcore/InstrumentationOptions.cs GitHub Actions / check-format-stable
Check warning on line 1 in docs/trace/getting-started-aspnetcore/InstrumentationOptions.cs GitHub Actions / check-format-stable
Check warning on line 1 in docs/trace/getting-started-aspnetcore/InstrumentationOptions.cs GitHub Actions / check-format-stable
Check warning on line 1 in docs/trace/getting-started-aspnetcore/InstrumentationOptions.cs GitHub Actions / check-format-experimental
Check warning on line 1 in docs/trace/getting-started-aspnetcore/InstrumentationOptions.cs GitHub Actions / check-format-experimental
|
||
// 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> | ||
|
||
public class InstrumentationOptions | ||
{ | ||
public bool EnableInstrumentation { get; set; } | ||
|
||
public bool EnableMiddlewareInstrumentation { get; set; } | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// <copyright file="TelemetryMiddleware.cs" company="OpenTelemetry Authors"> | ||
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (ubuntu-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (ubuntu-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test (windows-latest, net7.0)
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-stable
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-stable
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-stable
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-stable
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net462)
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-experimental
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-experimental
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-experimental
Check warning on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / check-format-experimental
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net7.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-experimental (windows-latest, net8.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-stable (windows-latest, net6.0)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
Check failure on line 1 in src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/TelemetryMiddleware.cs GitHub Actions / build-test-report (windows-latest)
|
||
// 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> | ||
|
||
using Microsoft.AspNetCore.Http; | ||
|
||
namespace OpenTelemetry.Instrumentation.AspNetCore.Implementation; | ||
|
||
/// <summary> | ||
/// Telemetry middleware. | ||
/// </summary> | ||
/// <remarks> | ||
/// Initializes a new instance of the <see cref="TelemetryMiddleware"/> class. | ||
/// </remarks> | ||
/// <param name="options">trace options.</param> | ||
public class TelemetryMiddleware(AspNetCoreTraceInstrumentationOptions options) : IMiddleware | ||
{ | ||
internal readonly HttpInListener InListener = new HttpInListener(options); | ||
|
||
/// <inheritdoc/> | ||
public async Task InvokeAsync(HttpContext context, RequestDelegate next) | ||
{ | ||
try | ||
{ | ||
this.InListener.OnEventWritten("Microsoft.AspNetCore.Hosting.HttpRequestIn.Start", context); | ||
await next(context).ConfigureAwait(false); | ||
this.InListener.OnEventWritten("Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop", context); | ||
} | ||
catch | ||
{ | ||
// Exception | ||
} | ||
} | ||
} |