Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/nuget/OpenTelemetry.Instrumentati…
Browse files Browse the repository at this point in the history
…on.AspNetCore-1.8.1
  • Loading branch information
0GiS0 authored Dec 27, 2024
2 parents 46f971d + fd7e29a commit d8ed5b8
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 46 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ services:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686" # Jaeger UI
command: --query.ui-config=/etc/jaeger/jaeger-ui.json --collector.otlp.enabled=true --prometheus.server-url=http://prometheus:9090 --prometheus.query.support-spanmetrics-connector=true
# command: --query.ui-config=/etc/jaeger/jaeger-ui.json --collector.otlp.enabled=true --prometheus.server-url=http://prometheus:9090 --prometheus.query.support-spanmetrics-connector=true
command: --query.ui-config=/etc/jaeger/jaeger-ui.json --collector.otlp.enabled=true --prometheus.server-url=http://prometheus:9090
environment:
METRICS_STORAGE_TYPE: "prometheus"
PROMETHEUS_QUERY_NORMALIZE_CALLS: true
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ updates:
schedule:
interval: "weekly"

- package-ecosystem: "devcontainer"
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "weekly"
35 changes: 21 additions & 14 deletions .github/workflows/techdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,28 @@ jobs:
runs-on: ubuntu-latest

env:
ENTITY_NAMESPACE: 'default'
ENTITY_KIND: 'Component'
ENTITY_NAME: 'heroes-api'
ENTITY_NAMESPACE: "default"
ENTITY_KIND: "api"
ENTITY_NAME: "heroes-dotnet-api"

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install -g @techdocs/cli
- run: |
techdocs/cli generate --no-docker --source-dir docs --verbose
- run: |
techdocs/cli publish --publisher-type azureBlobStorage \
--azureAccountName ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }} \
--azureAccountKey ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }} \
--storage-name ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }} \
--verbose
node-version: "18"
- name: Install TechDocs CLI
run: npm install -g @techdocs/cli

- name: Install MkDocs TechDocs Core
run: pip install mkdocs-techdocs-core

- name: Generate documentation
run: techdocs-cli generate --no-docker --verbose
- name: Publish documentation on Azure Blob Storage
run: |
techdocs-cli publish \
--entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME \
--publisher-type azureBlobStorage \
--azureAccountName ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }} \
--azureAccountKey ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }} \
--storage-name ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -466,3 +466,5 @@ terraform/terraform.tfstate.backup
.dccache
terraform/.terraform/providers/registry.terraform.io/hashicorp/azurerm/3.47.0/linux_amd64/terraform-provider-azurerm_v3.47.0_x5
terraform/.terraform/terraform.tfstate

*.sln
9 changes: 9 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
},
{
"name": "Docker .NET Launch",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"netCore": {
"appProject": "${workspaceFolder}/tour-of-heroes-api.csproj"
}
}
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"appService.preDeployTask": "publish-release",
"appService.deploySubpath": "bin/Release/net8.0/publish"
}
114 changes: 87 additions & 27 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "clean",
"command": "dotnet",
"type": "process",
"args": [
"clean",
"${workspaceFolder}",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish-release",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}",
"--configuration",
"Release",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile",
"dependsOn": "clean"
{
"label": "clean",
"command": "dotnet",
"type": "process",
"args": [
"clean",
"${workspaceFolder}",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish-release",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}",
"--configuration",
"Release",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile",
"dependsOn": "clean"
},
{
"label": "build",
Expand Down Expand Up @@ -63,6 +63,66 @@
"${workspaceFolder}/tour-of-heroes-api.csproj"
],
"problemMatcher": "$msCompile"
},
{
"type": "docker-build",
"label": "docker-build: debug",
"dependsOn": [
"build"
],
"dockerBuild": {
"tag": "tourofheroesdotnetapi:dev",
"target": "base",
"dockerfile": "${workspaceFolder}/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
},
"netCore": {
"appProject": "${workspaceFolder}/tour-of-heroes-api.csproj"
}
},
{
"type": "docker-build",
"label": "docker-build: release",
"dependsOn": [
"build"
],
"dockerBuild": {
"tag": "tourofheroesdotnetapi:latest",
"dockerfile": "${workspaceFolder}/Dockerfile",
"context": "${workspaceFolder}",
"platform": {
"os": "linux",
"architecture": "amd64"
},
"pull": true
},
"netCore": {
"appProject": "${workspaceFolder}/tour-of-heroes-api.csproj"
}
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": [
"docker-build: debug"
],
"dockerRun": {},
"netCore": {
"appProject": "${workspaceFolder}/tour-of-heroes-api.csproj",
"enableDebugging": true
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": [
"docker-build: release"
],
"dockerRun": {},
"netCore": {
"appProject": "${workspaceFolder}/tour-of-heroes-api.csproj"
}
}
]
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV OTEL_SERVICE_NAME=tour-of-heroes-api
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser

FROM mcr.microsoft.com/dotnet/sdk:8.0.203 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0.401 AS build

ARG TARGETARCH
ARG TARGETOS
Expand Down
7 changes: 5 additions & 2 deletions tour-of-heroes-api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />

Expand All @@ -21,9 +21,12 @@
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />

<!-- Instrumentation -->

<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.10" />
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.11" />

<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.8.0" />

<PackageReference Include="OpenTelemetry.Instrumentation.Process" Version="0.5.0-beta.4" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.6.0-beta.3" />
Expand Down

0 comments on commit d8ed5b8

Please sign in to comment.