Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add old profile reminders #591

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion sample/SkyApm.Sample.Logging/SkyApm.Sample.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
using SkyApm.PeerFormatters.SqlClient;
using SkyApm.PeerFormatters.MySqlConnector;
using ILoggerFactory = SkyApm.Logging.ILoggerFactory;
using System.IO;

namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions
{
private static string oldConfigName = "skywalking.json";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When did we use this name? From which version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skywalking.json???

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. 2.1 to 2.2?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to be this sywalk.json, I used the old version to upgrade to 2.2, but apache-skywalk-APM-9.5.0 view is empty, but I have dropped to 2.1, view the source code only to find that the configuration name has changed

public static IServiceCollection AddSkyAPM(this IServiceCollection services,
Action<SkyApmExtensions> extensionsSetup = null)
{
Expand All @@ -56,7 +58,13 @@ public static IServiceCollection AddSkyAPM(this IServiceCollection services,
environment = "Development";
}

if (File.Exists(oldConfigName))
{
throw new FileLoadException("The new configuration file name is skyapm.json, please update");
}

IConfigurationBuilder configurationBuilder = new ConfigurationBuilder();

configurationBuilder.AddJsonFile("skyapm.json", true);
configurationBuilder.AddJsonFile("skyapm." + environment + ".json", true);
IConfiguration configuration = configurationBuilder.Build();
Expand Down
Loading