Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BailunTrace
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wms
BailunTrace
Commits
03525d7b
Commit
03525d7b
authored
Apr 09, 2020
by
huangzhihong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
75532b0f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
README.md
doc/README.md
+1
-12
No files found.
doc/README.md
View file @
03525d7b
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
## 一、集成方法
## 一、集成方法
1.
**AspNetCore**
配置
1.
**AspNetCore**
配置
-
`Startup.cs`
-
`Startup.cs`
``` C#
``` C#
...
@@ -14,7 +13,6 @@
...
@@ -14,7 +13,6 @@
app.UseAbpService(_appConfiguration, loggerFactory, apiInfo);
app.UseAbpService(_appConfiguration, loggerFactory, apiInfo);
}
}
```
```
- `Program.cs`
- `Program.cs`
``` C#
``` C#
...
@@ -34,9 +32,9 @@
...
@@ -34,9 +32,9 @@
```
```
1.
**Console**
配置
1.
**Console**
配置
-
`Program.cs`
-
`Program.cs`
1.
**appsettings.json**
1.
**appsettings.json**
1. 移除所有 `Microsoft.Extension.logging.ILogger` 的配置
1. 移除所有 `Microsoft.Extension.logging.ILogger` 的配置
...
@@ -133,7 +131,6 @@
...
@@ -133,7 +131,6 @@
```
```
1.
输出格式化
1.
输出格式化
-
值对象,直接输出值。 包括以下:
-
值对象,直接输出值。 包括以下:
- Booleans - bool
- Booleans - bool
...
@@ -149,7 +146,6 @@
...
@@ -149,7 +146,6 @@
var count = 456;
var count = 456;
Log.Information("Retrieved {Count} records", count);
Log.Information("Retrieved {Count} records", count);
```
```
- 集合,继承自 `IEnumerable`
- 集合,继承自 `IEnumerable`
> 如下示例,打印结果为: `In my bowl I have ["Apple","Pear","Orange"]`
> 如下示例,打印结果为: `In my bowl I have ["Apple","Pear","Orange"]`
...
@@ -158,7 +154,6 @@
...
@@ -158,7 +154,6 @@
var fruit = new[] { "Apple", "Pear", "Orange" };
var fruit = new[] { "Apple", "Pear", "Orange" };
Log.Information("In my bowl I have {Fruit}", fruit);
Log.Information("In my bowl I have {Fruit}", fruit);
```
```
- Dictionary,继承自 `IEnumerable`, Key 类型为值类型
- Dictionary,继承自 `IEnumerable`, Key 类型为值类型
> 如下示例,打印结果为: `In my bowl I have {"Apple":1,"Pear":5}`
> 如下示例,打印结果为: `In my bowl I have {"Apple":1,"Pear":5}`
...
@@ -167,7 +162,6 @@
...
@@ -167,7 +162,6 @@
var fruit = new Dictionary<string, int> { { "Apple", 1 }, { "Pear", 5 } };
var fruit = new Dictionary<string, int> { { "Apple", 1 }, { "Pear", 5 } };
Log.Information("In my bowl I have {Fruit}", fruit);
Log.Information("In my bowl I have {Fruit}", fruit);
```
```
- Dictionary,继承自 `IEnumerable`, Key 类型为复杂类型
- Dictionary,继承自 `IEnumerable`, Key 类型为复杂类型
> 如下示例,打印结果为: `In my bowl I have ["[Bailun.ServiceFabric.Trace.Test.Fruit, 1]","[Bailun.ServiceFabric.Trace.Test.Fruit, 5]"]`
> 如下示例,打印结果为: `In my bowl I have ["[Bailun.ServiceFabric.Trace.Test.Fruit, 1]","[Bailun.ServiceFabric.Trace.Test.Fruit, 5]"]`
...
@@ -194,7 +188,6 @@
...
@@ -194,7 +188,6 @@
1.
扩展属性
1.
扩展属性
> 扩展的属性全都展示在 Exceptionless 日志详情的 Extended Data,Exceptionless 会给属性加上索引,方便检索。以下两种方式添加自定义扩展属性
> 扩展的属性全都展示在 Exceptionless 日志详情的 Extended Data,Exceptionless 会给属性加上索引,方便检索。以下两种方式添加自定义扩展属性
- `AddProperty` 扩展方法:
- `AddProperty` 扩展方法:
``` C#
``` C#
...
@@ -202,7 +195,6 @@
...
@@ -202,7 +195,6 @@
.AddProperty("CustomProperty1", "CustomValue1") //自定义扩展属性 CustomProperty1
.AddProperty("CustomProperty1", "CustomValue1") //自定义扩展属性 CustomProperty1
.AddProperty("CustomProperty2", new { Name = "Jack", Age = 18 }) //自定义扩展属性 CustomProperty2
.AddProperty("CustomProperty2", new { Name = "Jack", Age = 18 }) //自定义扩展属性 CustomProperty2
```
```
- 格式化输出:
- 格式化输出:
``` C#
``` C#
...
@@ -227,7 +219,6 @@
...
@@ -227,7 +219,6 @@
## 五、使用 `APM` 扩展日志 —— `SkyWalking`
## 五、使用 `APM` 扩展日志 —— `SkyWalking`
1.
客户端
1.
客户端
-
SkyAPM.Agent.AspNetCore
-
SkyAPM.Agent.AspNetCore
-
SkyAPM.Agent.GeneralHost
-
SkyAPM.Agent.GeneralHost
-
SkyAPM.Agent.AspNet
-
SkyAPM.Agent.AspNet
...
@@ -249,9 +240,7 @@
...
@@ -249,9 +240,7 @@
> **特别注意:** 配置文件 `skyapm.json` 复制属性 更改为 `始终复制` 或 `较新则复制`
> **特别注意:** 配置文件 `skyapm.json` 复制属性 更改为 `始终复制` 或 `较新则复制`
1.
使用方法
1.
使用方法
-
通过环境变量
`ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore`
配置
`Aspnetcore`
客户端的入口程序集
-
通过环境变量
`ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore`
配置
`Aspnetcore`
客户端的入口程序集
-
通过环境变量
`SKYWALKING__SERVICENAME=sample_app`
配置服务名称,不配置则使用
`skyapm.json`
的
`ServiceName`
-
通过环境变量
`SKYWALKING__SERVICENAME=sample_app`
配置服务名称,不配置则使用
`skyapm.json`
的
`ServiceName`
1.
自定义
`Diagnostic`
上传跟踪信息
1.
自定义
`Diagnostic`
上传跟踪信息
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment