Skip to content

Commit

Permalink
Merge branch 'main' into ppittle/bug/aws-sqs-md5-hash-mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
utpilla authored Feb 20, 2024
2 parents 87085d1 + 2f3a694 commit 61c8b0e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 31 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: "CodeQL"

on:
schedule:
- cron: '0 0 * * *' # once in a day at 00:00
- cron: '0 0 * * *' # once in a day at 00:00
workflow_dispatch:

jobs:
Expand All @@ -18,11 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['csharp']
# Learn more...
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: configure Pagefile
Expand All @@ -35,31 +31,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v4

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
- name: dotnet pack opentelemetry-dotnet-contrib.proj
run: dotnet pack opentelemetry-dotnet-contrib.proj --configuration Release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
5 changes: 5 additions & 0 deletions examples/AspNet/Views/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
</appSettings>

<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
Expand Down
5 changes: 5 additions & 0 deletions examples/AspNet/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<httpRuntime targetFramework="4.8" maxRequestLength="2147483647" executionTimeout="300"/>
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
<remove name="OPTIONSVerbHandler"/>
Expand Down
6 changes: 5 additions & 1 deletion examples/wcf/server-aspnetframework/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@
</services>
</system.serviceModel>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
<modules runAllManagedModulesForAllRequests="true">
<add name="TelemetryHttpModule" type="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule,OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" preCondition="integratedMode,managedHandler" />
</modules>
<directoryBrowse enabled="true" />
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Expand Down
12 changes: 10 additions & 2 deletions opentelemetry-dotnet-contrib.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@

<ItemGroup>
<SolutionProjects Include="**\*.csproj" />

<TestProjects Include="test\**\*.csproj" />
<PackProjects Include="src\**\*.csproj" />
</ItemGroup>

<Target Name="Build">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore;Build" ContinueOnError="ErrorAndStop" />
<MSBuild Projects="@(SolutionProjects)" Targets="Build" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="Restore">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="Pack">
<MSBuild Projects="@(PackProjects)" Targets="Pack" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="VSTest">
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
</Target>

</Project>
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Exporter.Stackdriver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.0.0-beta.5

Released 2024-Feb-15

* Update OpenTelemetry SDK version to `1.7.0`.
([#1486](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1486))
* Add support of a native "gRPC for .NET" for apps targeting .NET 6.0 or later.
Expand Down
9 changes: 5 additions & 4 deletions src/Shared/SpanHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ public static Status ResolveSpanStatusForHttpStatusCode(int httpStatusCode)
/// <returns>Resolved span <see cref="Status"/> for the Http status code.</returns>
public static Status ResolveSpanStatusForHttpStatusCode(ActivityKind kind, int httpStatusCode)
{
var upperBound = kind == ActivityKind.Client ? 399 : 499;
if (httpStatusCode >= 100 && httpStatusCode <= upperBound)
var lowerBound = kind == ActivityKind.Client ? 400 : 500;
var upperBound = 599;
if (httpStatusCode >= lowerBound && httpStatusCode <= upperBound)
{
return Status.Unset;
return Status.Error;
}

return Status.Error;
return Status.Unset;
}
}

0 comments on commit 61c8b0e

Please sign in to comment.