Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"dotnet-validate"
],
"rollForward": false
},
"meziantou.framework.nugetpackagevalidation.tool": {
"version": "1.0.31",
"commands": [
"meziantou.validate-nuget-package"
],
"rollForward": false
}
}
}
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
outputs:
dotnet-sdk-version: ${{ steps.setup-dotnet.outputs.dotnet-version }}
dotnet-validate-version: ${{ steps.get-dotnet-tools-versions.outputs.dotnet-validate-version }}
nuget-package-validation-version: ${{ steps.get-dotnet-tools-versions.outputs.nuget-package-validation-version }}

permissions:
attestations: write
Expand Down Expand Up @@ -96,7 +97,9 @@ jobs:
run: |
$manifest = (Get-Content "./.config/dotnet-tools.json" | Out-String | ConvertFrom-Json)
$dotnetValidateVersion = $manifest.tools.'dotnet-validate'.version
$nugetPackageValidationVersion = $manifest.tools.'meziantou.framework.nugetpackagevalidation.tool'.version
"dotnet-validate-version=${dotnetValidateVersion}" >> ${env:GITHUB_OUTPUT}
"nuget-package-validation-version=${nugetPackageValidationVersion}" >> ${env:GITHUB_OUTPUT}

validate-packages:
needs: build-test
Expand All @@ -113,17 +116,33 @@ jobs:
with:
dotnet-version: ${{ needs.build-test.outputs.dotnet-sdk-version }}

- name: Validate NuGet packages
- name: Install NuGet package validation tools
shell: pwsh
env:
DOTNET_VALIDATE_VERSION: ${{ needs.build-test.outputs.dotnet-validate-version }}
NUGET_PACKAGE_VALIDATION_VERSION: ${{ needs.build-test.outputs.nuget-package-validation-version }}
run: |
dotnet tool install --global dotnet-validate --version ${env:DOTNET_VALIDATE_VERSION} --allow-roll-forward
dotnet tool install --global Meziantou.Framework.NuGetPackageValidation.Tool --version ${env:NUGET_PACKAGE_VALIDATION_VERSION} --allow-roll-forward

- name: Validate NuGet packages
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$packages = Get-ChildItem -Filter "*.nupkg" | ForEach-Object { $_.FullName }
$invalidPackages = 0
foreach ($package in $packages) {
$isValid = $true
dotnet validate package local $package
if ($LASTEXITCODE -ne 0) {
$isValid = $false
}
meziantou.validate-nuget-package $package --github-token ${env:GH_TOKEN}
if ($LASTEXITCODE -ne 0) {
$isValid = $false
}
if (-Not $isValid) {
$invalidPackages++
}
}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@

### New features

* Include XML documentation in the `Grafana.OpenTelemetry` and
`Grafana.OpenTelemetry.Base` NuGet packages.
[#295](https://github.com/grafana/grafana-opentelemetry-dotnet/pull/295)
* Enable metrics for SQL Client instrumentation
([#145](https://github.com/grafana/grafana-opentelemetry-dotnet/pull/145))
* Use 1.12.0 of OpenTelemetry ([#145](https://github.com/grafana/grafana-opentelemetry-dotnet/pull/145))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public abstract class ExporterSettings

/// <summary>
/// Applies the exporter settings by initializing an exporter on the
/// given <see cref="ILoggingBuilder"/>.
/// given <see cref="Microsoft.Extensions.Logging.ILoggingBuilder"/>.
/// </summary>
/// <param name="options">A <see cref="OpenTelemetryLoggerOptions"/> instance.</param>
internal abstract void Apply(OpenTelemetryLoggerOptions options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<Description>Minimal Grafana distribution of OpenTelemetry .NET</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TargetFrameworks>net8.0;netstandard2.0;net462</TargetFrameworks>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Grafana.OpenTelemetry/Grafana.OpenTelemetry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<Description>Full Grafana distribution of OpenTelemetry .NET</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TargetFrameworks>net8.0;netstandard2.0;net462</TargetFrameworks>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Grafana.OpenTelemetry
{
/// <summary>
/// Extension for the <see cref="OpenTelemetry.OpenTelemetryBuilder"/> provided by the OpenTelemetry .NET distribution
/// Extension for the <see cref="IOpenTelemetryBuilder"/> provided by the OpenTelemetry .NET distribution
/// for Grafana.
///
/// This is used for easier configuration for ASP.NET Core projects.
Expand Down
Loading