Skip to content

Commit a389221

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents d15a9e4 + 416e7e0 commit a389221

13 files changed

Lines changed: 89 additions & 26 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,7 @@ paket-files/
255255
global.json
256256

257257
# Anything that is local
258-
local.*
258+
local.*
259+
260+
# BenchmarkDotNet Results
261+
BenchmarkDotNet.Artifacts/

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ This is a quick guide for **ASP.NET Core** projects. If you want to run it **in
4444
...
4545
services.AddApplicationInsightsTelemetry("----Your Application Insights Instrumentation Key ----");
4646
services.AddApplicationInsightsKubernetesEnricher();
47-
services.AddMvc();
4847
...
4948
}
5049
```
@@ -96,8 +95,8 @@ Customize configurations are supported. There are several ways to customize the
9695
| Key | Value/Types | Default Value | Description |
9796
| -------------------------- | ----------- | ------------- | -------------------------------------------------------------------------------------------- |
9897
| InitializationTimeout | TimeSpan | 00:02:00 | Maximum time to wait for spinning up the container. Accepted format: [d.]hh:mm:ss[.fffffff]. |
99-
| ClusterInfoRefreshInterval | TimeSpan | 00:10:00 | For 3.x only. Get or sets how frequent to refresh the Kubernetes cluster properties. |
100-
| DisablePerformanceCounters | Boolean | false | Deprecated. Sets to true to avoid adding performance counter telemetry initializer. |
98+
| ClusterInfoRefreshInterval | TimeSpan | 00:10:00 | Get or sets how frequent to refresh the Kubernetes cluster properties. |
99+
| ~~DisablePerformanceCounters~~ | ~~Boolean~~ | ~~false~~ | Deprecated. Sets to true to avoid adding performance counter telemetry initializer. |
101100

102101
> Tips: Refer to [AppInsightsForKubernetesOptions.cs](./src/ApplicationInsights.Kubernetes/Extensions/AppInsightsForKubernetesOptions.cs) for the latest customization supported.
103102

examples/WebAPI.Net6/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Now that the image is in the container registry, it is time to deploy it to Kube
143143
144144
1. Deploy the application
145145
146-
Create a Kubernetes deployment file. Reference [k8s.yaml](./k8s.yaml) as an example, pay attention to **namespace**, **image**, and **environment variables**, making sure they are properly set up.
146+
Create a Kubernetes deployment file. Reference [k8s.yaml](./WebAPI/k8s.yaml) as an example, pay attention to **namespace**, **image**, and **environment variables**, making sure they are properly set up.
147147
148148
Then run the following command to deploy the app:
149149

src/ApplicationInsights.Kubernetes.HostingStartup/ApplicationInsights.Kubernetes.HostingStartup.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<!-- Explicit reference Microsoft.AspNetCore.Hosting even though it would be brought in by dependencies. -->
16-
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
17-
18-
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
15+
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" />
1916
</ItemGroup>
2017

2118
<ItemGroup>

src/ApplicationInsights.Kubernetes/ApplicationInsights.Kubernetes.csproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Features>IOperation</Features>
44
</PropertyGroup>
@@ -18,15 +18,15 @@
1818
</PropertyGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="KubernetesClient" Version="12.1.1" />
22-
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
23-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
24-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
25-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
26-
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="3.1.27" />
27-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
28-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4" />
29-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.6.2" />
21+
<PackageReference Include="KubernetesClient" />
22+
<PackageReference Include="Microsoft.ApplicationInsights" />
23+
<PackageReference Include="Microsoft.Extensions.Configuration" />
24+
<PackageReference Include="Microsoft.Extensions.Hosting" />
25+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
26+
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" />
27+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
28+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
29+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

src/ApplicationInsights.Kubernetes/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
// Allow unit tests to access internal members
44
[assembly: InternalsVisibleTo("Microsoft.ApplicationInsights.Kubernetes.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
5+
[assembly: InternalsVisibleTo("Benchmarks, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
56
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project>
1+
<Project>
22
<!-- <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> -->
33
<!--Build-->
44
<PropertyGroup>
@@ -32,7 +32,7 @@
3232
<RepositoryType />
3333
</PropertyGroup>
3434
<ItemGroup Condition=" '$(IsCIBuild)' == 'true' ">
35-
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
35+
<PackageReference Include="MicroBuild.Core">
3636
<PrivateAssets>all</PrivateAssets>
3737
</PackageReference>
3838
</ItemGroup>

src/Directory.Packages.props

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageVersion Include="KubernetesClient" Version="12.1.1" />
8+
<PackageVersion Include="MicroBuild.Core" Version="0.3.0" />
9+
<PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
10+
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />
11+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
12+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
13+
<PackageVersion Include="Microsoft.Extensions.DiagnosticAdapter" Version="3.1.32" />
14+
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
15+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
16+
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
17+
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
18+
</ItemGroup>
19+
</Project>

tests/Benchmarks/Benchmarks.csproj

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<ItemGroup>
4+
<ProjectReference Include="..\..\src\ApplicationInsights.Kubernetes\ApplicationInsights.Kubernetes.csproj" />
5+
</ItemGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="BenchMarkDotNet" Version="0.14.0" />
9+
</ItemGroup>
10+
11+
<PropertyGroup>
12+
<OutputType>Exe</OutputType>
13+
<TargetFramework>net8.0</TargetFramework>
14+
<ImplicitUsings>enable</ImplicitUsings>
15+
<Nullable>enable</Nullable>
16+
17+
18+
<SignAssembly>True</SignAssembly>
19+
<AssemblyOriginatorKeyFile>..\..\src\PublicKey.snk</AssemblyOriginatorKeyFile>
20+
<DelaySign>True</DelaySign>
21+
</PropertyGroup>
22+
23+
</Project>

tests/Benchmarks/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
using Benchmark;
2+
using BenchmarkDotNet.Running;
3+
4+
var summary = BenchmarkRunner.Run<StringUtilsBenchmark>();
5+
Console.WriteLine(summary);

0 commit comments

Comments
 (0)