Skip to content

Commit 8b52da7

Browse files
committed
use Seq.Syntax for expressions
1 parent 41df8f9 commit 8b52da7

File tree

7 files changed

+41
-19
lines changed

7 files changed

+41
-19
lines changed

Build.Docker.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ $archs = @(
1313
@{ rid = "arm64"; platform = "linux/arm64/v8" }
1414
)
1515

16+
$endToEndVersion = "preview"
17+
1618
function Execute-Tests
1719
{
1820
& dotnet test ./test/SeqCli.Tests/SeqCli.Tests.csproj -c Release -f $framework /p:Configuration=Release /p:VersionPrefix=$version
1921
if ($LASTEXITCODE -ne 0) { exit 1 }
2022

2123
cd ./test/SeqCli.EndToEnd/
22-
docker pull datalust/seq:latest
24+
docker pull "datalust/seq:$endToEndVersion"
25+
docker tag "datalust/seq:$endToEndVersion" latest
2326
& dotnet run -f $framework -- --docker-server
2427
if ($LASTEXITCODE -ne 0)
2528
{

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.100-rc.2.23502.2"
3+
"version": "8.0.100"
44
}
55
}

seqcli.sln

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ EndProjectSection
4646
EndProject
4747
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Roastery", "src\Roastery\Roastery.csproj", "{D2CB1112-7CD3-4A1B-A114-25130C96295E}"
4848
EndProject
49-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "extern", "extern", "{1F375B18-60F7-4505-870D-B2A058B16335}"
50-
EndProject
51-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Seq.Syntax", "extern\Seq.Syntax\Seq.Syntax.csproj", "{4ED574CE-AFC6-41B7-88EB-79533DC7111B}"
52-
EndProject
53-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Seq.Syntax.Tests", "extern\Seq.Syntax.Tests\Seq.Syntax.Tests.csproj", "{2291818D-F0AF-45C5-BEDB-19C47296A0C5}"
54-
EndProject
5549
Global
5650
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5751
Debug|AnyCPU = Debug|AnyCPU
@@ -74,14 +68,6 @@ Global
7468
{DBC69360-519B-4A9B-829B-2AE1B5412521}.Debug|AnyCPU.Build.0 = Debug|Any CPU
7569
{DBC69360-519B-4A9B-829B-2AE1B5412521}.Release|AnyCPU.ActiveCfg = Release|Any CPU
7670
{DBC69360-519B-4A9B-829B-2AE1B5412521}.Release|AnyCPU.Build.0 = Release|Any CPU
77-
{4ED574CE-AFC6-41B7-88EB-79533DC7111B}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
78-
{4ED574CE-AFC6-41B7-88EB-79533DC7111B}.Debug|AnyCPU.Build.0 = Debug|Any CPU
79-
{4ED574CE-AFC6-41B7-88EB-79533DC7111B}.Release|AnyCPU.ActiveCfg = Release|Any CPU
80-
{4ED574CE-AFC6-41B7-88EB-79533DC7111B}.Release|AnyCPU.Build.0 = Release|Any CPU
81-
{2291818D-F0AF-45C5-BEDB-19C47296A0C5}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
82-
{2291818D-F0AF-45C5-BEDB-19C47296A0C5}.Debug|AnyCPU.Build.0 = Debug|Any CPU
83-
{2291818D-F0AF-45C5-BEDB-19C47296A0C5}.Release|AnyCPU.ActiveCfg = Release|Any CPU
84-
{2291818D-F0AF-45C5-BEDB-19C47296A0C5}.Release|AnyCPU.Build.0 = Release|Any CPU
8571
EndGlobalSection
8672
GlobalSection(SolutionProperties) = preSolution
8773
HideSolutionNode = FALSE
@@ -92,8 +78,6 @@ Global
9278
{B86DEF3C-C461-4126-AD49-986EBB19B487} = {3587B633-0C03-4235-8903-6226900328F1}
9379
{7F7CAC3A-1046-4D2B-BF9F-F14525918295} = {0779824B-502D-450B-BB43-036949C911C4}
9480
{D2CB1112-7CD3-4A1B-A114-25130C96295E} = {FC0A256C-CC1F-4ECE-AF09-707248D10DC1}
95-
{4ED574CE-AFC6-41B7-88EB-79533DC7111B} = {1F375B18-60F7-4505-870D-B2A058B16335}
96-
{2291818D-F0AF-45C5-BEDB-19C47296A0C5} = {1F375B18-60F7-4505-870D-B2A058B16335}
9781
EndGlobalSection
9882
GlobalSection(ExtensibilityGlobals) = postSolution
9983
SolutionGuid = {6D299713-28D4-4078-9DA7-9033679CD200}

src/SeqCli/SeqCli.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<ItemGroup>
2929
<PackageReference Include="Destructurama.JsonNet" Version="2.0.0" />
3030
<PackageReference Include="newtonsoft.json" Version="13.0.3" />
31+
<PackageReference Include="Seq.Syntax" Version="1.0.0-dev-00060" />
3132
<PackageReference Include="Serilog" Version="3.1.0-dev-02078" />
3233
<PackageReference Include="serilog.expressions" Version="4.0.0-dev-00139" />
3334
<PackageReference Include="Serilog.Formatting.Compact" Version="2.0.0-dev-00961" />
@@ -43,7 +44,6 @@
4344
<PackageReference Include="Tavis.UriTemplates" Version="2.0.0" />
4445
</ItemGroup>
4546
<ItemGroup>
46-
<ProjectReference Include="..\..\extern\Seq.Syntax\Seq.Syntax.csproj" />
4747
<ProjectReference Include="..\Roastery\Roastery.csproj" />
4848
</ItemGroup>
4949
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"@t":"2023-12-20T00:55:07Z","@st":"2023-12-20T00:50:07Z","@tr":"af2f559d8ac24a288d2aaef55439778b","@sp":"5b08fd4ac3aa42d4","@ps":"44acf182dec544fb","@ra":{"a":1},"@m":"My info log"}
2+
{"@l":"Warning","@t":"2023-12-20T00:55:07Z","@st":"2023-12-20T00:50:07Z","@tr":"af2f559d8ac24a288d2aaef55439778b","@sp":"5b08fd4ac3aa42d4","@ps":"44acf182dec544fb","@ra":{"a":1},"@m":"My warning log"}
3+
{"@l":"ERR","@t":"2023-12-20T00:55:07Z","@st":"2023-12-20T00:50:07Z","@tr":"af2f559d8ac24a288d2aaef55439778b","@sp":"5b08fd4ac3aa42d4","@ps":"44acf182dec544fb","@ra":{"a":1},"@m":"My error log"}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System.IO;
2+
using System.Linq;
3+
using System.Threading.Tasks;
4+
using Seq.Api;
5+
using SeqCli.EndToEnd.Support;
6+
using Serilog;
7+
using Xunit;
8+
9+
namespace SeqCli.EndToEnd.Ingest;
10+
11+
public class SpanIngestionTestCase : ICliTestCase
12+
{
13+
public async Task ExecuteAsync(
14+
SeqConnection connection,
15+
ILogger logger,
16+
CliCommandRunner runner)
17+
{
18+
var inputFile = Path.Combine("Data", "spans.clef");
19+
Assert.True(File.Exists(inputFile));
20+
21+
var exit = runner.Exec("ingest", $"--json -i {inputFile}");
22+
Assert.Equal(0, exit);
23+
24+
var events = await connection.Events.ListAsync();
25+
Assert.Equal(3, events.Count);
26+
Assert.Equal(3, events.Count(e => e.TraceId == "af2f559d8ac24a288d2aaef55439778b"));
27+
Assert.Equal(3, events.Count(e => e.SpanId == "5b08fd4ac3aa42d4"));
28+
}
29+
}

test/SeqCli.EndToEnd/SeqCli.EndToEnd.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
<None Update="Data\*">
1414
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1515
</None>
16+
<None Update="Data\spans.clef">
17+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
18+
</None>
1619
</ItemGroup>
1720
<ItemGroup>
1821
<ProjectReference Include="..\..\src\SeqCli\SeqCli.csproj" />

0 commit comments

Comments
 (0)