Skip to content

Commit 643ff9e

Browse files
authored
Merge pull request #112 from serilog-contrib/dev
add trace and span id support
2 parents e29c3fb + 36e2d31 commit 643ff9e

File tree

8 files changed

+32
-10
lines changed

8 files changed

+32
-10
lines changed

.github/dependabot.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "01:00"
8+
open-pull-requests-limit: 10
9+
10+
- package-ecosystem: nuget
11+
directory: "/"
12+
schedule:
13+
interval: daily
14+
time: "02:00"
15+
open-pull-requests-limit: 10

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3838
with:
3939
fetch-depth: 0
4040

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ public static class Program
160160

161161
### Change Log
162162

163+
9.1.0
164+
* Add: Built-in trace and span id support
165+
163166
9.0.0
164167
* Breaking: Due to issue with creating provides from configuration
165168
* `IDocumentFactory.Create` add AzureTableStorageSinkOptions and IKeyGenerator arguments

samples/SampleConsoleApplication/SampleConsoleApplication.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<ItemGroup>
2424
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
2525
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
26-
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.0" />
27-
<PackageReference Include="Serilog.sinks.Console" Version="4.1.0" />
26+
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.1" />
27+
<PackageReference Include="Serilog.sinks.Console" Version="5.0.0" />
2828
</ItemGroup>
2929

3030
<ItemGroup>

serilog-sinks-azuretablestorage.sln

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Artifacts", "Artifacts", "{
77
ProjectSection(SolutionItems) = preProject
88
.editorconfig = .editorconfig
99
.github\workflows\build.yml = .github\workflows\build.yml
10-
CHANGES.md = CHANGES.md
1110
README.md = README.md
1211
EndProjectSection
1312
EndProject
@@ -19,7 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{18BA
1918
EndProject
2019
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleWebApplication", "samples\SampleWebApplication\SampleWebApplication.csproj", "{420A3E41-C520-420D-95E6-24CF86BF7477}"
2120
EndProject
22-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleConsoleApplication", "samples\SampleConsoleApplication\SampleConsoleApplication.csproj", "{2F82E3DC-7071-41AD-A1E9-9CB70CF27CDA}"
21+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleConsoleApplication", "samples\SampleConsoleApplication\SampleConsoleApplication.csproj", "{2F82E3DC-7071-41AD-A1E9-9CB70CF27CDA}"
2322
EndProject
2423
Global
2524
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/Serilog.Sinks.AzureTableStorage/Serilog.Sinks.AzureTableStorage.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242

4343
<ItemGroup>
4444
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="All" />
45-
<PackageReference Include="Serilog" Version="3.0.1" />
45+
<PackageReference Include="Serilog" Version="3.1.0" />
4646
<PackageReference Include="Serilog.Sinks.PeriodicBatching" Version="3.1.0" />
47-
<PackageReference Include="Azure.Data.Tables" Version="12.8.0" />
47+
<PackageReference Include="Azure.Data.Tables" Version="12.8.1" />
4848
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
4949
</ItemGroup>
5050
</Project>

src/Serilog.Sinks.AzureTableStorage/Sinks/AzureTableStorage/DefaultDocumentFactory.cs

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public virtual TableEntity Create(LogEvent logEvent, AzureTableStorageSinkOption
4747
tableEntity["MessageTemplate"] = logEvent.MessageTemplate.Text;
4848
tableEntity["RenderedMessage"] = logEvent.RenderMessage(options.FormatProvider);
4949

50+
if (logEvent.TraceId != null)
51+
tableEntity["TraceId"] = logEvent.TraceId.Value.ToHexString();
52+
53+
if (logEvent.SpanId != null)
54+
tableEntity["SpanId"] = logEvent.SpanId.Value.ToHexString();
5055

5156
if (logEvent.Exception != null)
5257
tableEntity["Exception"] = logEvent.Exception.ToString();

test/Serilog.Sinks.AzureTableStorage.Tests/Serilog.Sinks.AzureTableStorage.Tests.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
1818
<PrivateAssets>all</PrivateAssets>
1919
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2020
</PackageReference>
21-
<PackageReference Include="xunit" Version="2.5.0" />
21+
<PackageReference Include="xunit" Version="2.6.1" />
2222
</ItemGroup>
2323

2424
</Project>

0 commit comments

Comments
 (0)