Skip to content

Commit

Permalink
Merge pull request #13 from liuhaoyang/dev
Browse files Browse the repository at this point in the history
push preview-0.0.2
  • Loading branch information
liuhaoyang authored Jan 7, 2018
2 parents 00e9854 + 5d888d6 commit a11c6c1
Show file tree
Hide file tree
Showing 109 changed files with 674 additions and 1,632 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ paket-files/
# CodeRush
.cr/

#vsc
.vscode

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
Expand Down
65 changes: 29 additions & 36 deletions Butterfly.sln
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2002
VisualStudioVersion = 15.0.27130.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2E623577-C14B-42DB-97D3-EBF1E1B5B554}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Butterfly.OpenTracing", "src\Butterfly.OpenTracing\Butterfly.OpenTracing.csproj", "{3539233D-B905-497F-8178-2304CBDBA768}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Butterfly.Core", "src\Butterfly.Core\Butterfly.Core.csproj", "{ED0C7CB9-CF67-404B-A788-03646BF351F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.Server", "src\Butterfly.Server\Butterfly.Server.csproj", "{435C00C6-DF6A-487B-986C-E2A346D9A064}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.Protocal", "src\Butterfly.Protocal\Butterfly.Protocal.csproj", "{D4A728C1-35D6-4107-B52C-16E44B46F1F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.EntityFrameworkCore", "src\Butterfly.EntityFrameworkCore\Butterfly.EntityFrameworkCore.csproj", "{800A2351-F707-42EF-8A35-209F82563DF9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Storage", "Storage", "{6EB52406-41A3-492D-90B6-2EF0CB0B222F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Collector", "Collector", "{2CD13284-D7A4-4C5F-AC42-8371A7D02109}"
Expand All @@ -25,54 +17,55 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{BD3493
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Flow", "Flow", "{2F9B9267-7F12-44F1-B073-6BF587DD59EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.Flow.InMemory", "src\Butterfly.Flow.InMemory\Butterfly.Flow.InMemory.csproj", "{5FEAFE6F-1192-4B13-9C09-6D81759FEFE2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.DataContract", "src\Butterfly.DataContract\Butterfly.DataContract.csproj", "{E6A100D1-BE31-48E1-9AFD-8E3777623DD8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.EntityFrameworkCore", "src\Butterfly.EntityFrameworkCore\Butterfly.EntityFrameworkCore.csproj", "{51D91BD8-2DB7-4C8A-B07E-CD3BBD81C754}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.Flow.InMemory", "src\Butterfly.Flow.InMemory\Butterfly.Flow.InMemory.csproj", "{74D6368F-7AC6-4C6F-9AD3-E72B3BB24CA0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Butterfly.Server", "src\Butterfly.Server\Butterfly.Server.csproj", "{102CEB77-5911-47F4-99E6-FC3FC97FC989}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3539233D-B905-497F-8178-2304CBDBA768}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3539233D-B905-497F-8178-2304CBDBA768}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3539233D-B905-497F-8178-2304CBDBA768}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3539233D-B905-497F-8178-2304CBDBA768}.Release|Any CPU.Build.0 = Release|Any CPU
{ED0C7CB9-CF67-404B-A788-03646BF351F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED0C7CB9-CF67-404B-A788-03646BF351F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED0C7CB9-CF67-404B-A788-03646BF351F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED0C7CB9-CF67-404B-A788-03646BF351F5}.Release|Any CPU.Build.0 = Release|Any CPU
{435C00C6-DF6A-487B-986C-E2A346D9A064}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{435C00C6-DF6A-487B-986C-E2A346D9A064}.Debug|Any CPU.Build.0 = Debug|Any CPU
{435C00C6-DF6A-487B-986C-E2A346D9A064}.Release|Any CPU.ActiveCfg = Release|Any CPU
{435C00C6-DF6A-487B-986C-E2A346D9A064}.Release|Any CPU.Build.0 = Release|Any CPU
{D4A728C1-35D6-4107-B52C-16E44B46F1F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4A728C1-35D6-4107-B52C-16E44B46F1F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4A728C1-35D6-4107-B52C-16E44B46F1F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4A728C1-35D6-4107-B52C-16E44B46F1F1}.Release|Any CPU.Build.0 = Release|Any CPU
{800A2351-F707-42EF-8A35-209F82563DF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{800A2351-F707-42EF-8A35-209F82563DF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{800A2351-F707-42EF-8A35-209F82563DF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{800A2351-F707-42EF-8A35-209F82563DF9}.Release|Any CPU.Build.0 = Release|Any CPU
{5FEAFE6F-1192-4B13-9C09-6D81759FEFE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FEAFE6F-1192-4B13-9C09-6D81759FEFE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FEAFE6F-1192-4B13-9C09-6D81759FEFE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FEAFE6F-1192-4B13-9C09-6D81759FEFE2}.Release|Any CPU.Build.0 = Release|Any CPU
{E6A100D1-BE31-48E1-9AFD-8E3777623DD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6A100D1-BE31-48E1-9AFD-8E3777623DD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6A100D1-BE31-48E1-9AFD-8E3777623DD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6A100D1-BE31-48E1-9AFD-8E3777623DD8}.Release|Any CPU.Build.0 = Release|Any CPU
{51D91BD8-2DB7-4C8A-B07E-CD3BBD81C754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51D91BD8-2DB7-4C8A-B07E-CD3BBD81C754}.Debug|Any CPU.Build.0 = Debug|Any CPU
{51D91BD8-2DB7-4C8A-B07E-CD3BBD81C754}.Release|Any CPU.ActiveCfg = Release|Any CPU
{51D91BD8-2DB7-4C8A-B07E-CD3BBD81C754}.Release|Any CPU.Build.0 = Release|Any CPU
{74D6368F-7AC6-4C6F-9AD3-E72B3BB24CA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74D6368F-7AC6-4C6F-9AD3-E72B3BB24CA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74D6368F-7AC6-4C6F-9AD3-E72B3BB24CA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74D6368F-7AC6-4C6F-9AD3-E72B3BB24CA0}.Release|Any CPU.Build.0 = Release|Any CPU
{102CEB77-5911-47F4-99E6-FC3FC97FC989}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{102CEB77-5911-47F4-99E6-FC3FC97FC989}.Debug|Any CPU.Build.0 = Debug|Any CPU
{102CEB77-5911-47F4-99E6-FC3FC97FC989}.Release|Any CPU.ActiveCfg = Release|Any CPU
{102CEB77-5911-47F4-99E6-FC3FC97FC989}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{ED0C7CB9-CF67-404B-A788-03646BF351F5} = {F5006079-5343-40F4-A68D-8435DE36353D}
{6EB52406-41A3-492D-90B6-2EF0CB0B222F} = {2E623577-C14B-42DB-97D3-EBF1E1B5B554}
{800A2351-F707-42EF-8A35-209F82563DF9} = {6EB52406-41A3-492D-90B6-2EF0CB0B222F}
{2CD13284-D7A4-4C5F-AC42-8371A7D02109} = {2E623577-C14B-42DB-97D3-EBF1E1B5B554}
{F5006079-5343-40F4-A68D-8435DE36353D} = {2E623577-C14B-42DB-97D3-EBF1E1B5B554}
{D4A728C1-35D6-4107-B52C-16E44B46F1F1} = {F5006079-5343-40F4-A68D-8435DE36353D}
{3539233D-B905-497F-8178-2304CBDBA768} = {F5006079-5343-40F4-A68D-8435DE36353D}
{ED0C7CB9-CF67-404B-A788-03646BF351F5} = {F5006079-5343-40F4-A68D-8435DE36353D}
{BD349368-FB1D-4C0E-B117-C8CA80DBC5FA} = {2E623577-C14B-42DB-97D3-EBF1E1B5B554}
{435C00C6-DF6A-487B-986C-E2A346D9A064} = {BD349368-FB1D-4C0E-B117-C8CA80DBC5FA}
{2F9B9267-7F12-44F1-B073-6BF587DD59EF} = {2E623577-C14B-42DB-97D3-EBF1E1B5B554}
{5FEAFE6F-1192-4B13-9C09-6D81759FEFE2} = {2F9B9267-7F12-44F1-B073-6BF587DD59EF}
{E6A100D1-BE31-48E1-9AFD-8E3777623DD8} = {F5006079-5343-40F4-A68D-8435DE36353D}
{51D91BD8-2DB7-4C8A-B07E-CD3BBD81C754} = {6EB52406-41A3-492D-90B6-2EF0CB0B222F}
{74D6368F-7AC6-4C6F-9AD3-E72B3BB24CA0} = {2F9B9267-7F12-44F1-B073-6BF587DD59EF}
{102CEB77-5911-47F4-99E6-FC3FC97FC989} = {BD349368-FB1D-4C0E-B117-C8CA80DBC5FA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3D45CC9B-D8C6-4DC1-8D68-09FBCD9371A8}
Expand Down
2 changes: 1 addition & 1 deletion build/version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>0.0.1</VersionPrefix>
<VersionPrefix>0.0.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Version>$(VersionPrefix)$(VersionSuffix)</Version>
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
Expand Down
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions src/Butterfly.Core/Butterfly.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</Description>
<AssemblyTitle>Butterfly.Core</AssemblyTitle>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Butterfly.Core</AssemblyName>
<PackageId>Butterfly.Core</PackageId>
<PackageTags>Butterfly;Tracing;APM</PackageTags>
Expand All @@ -14,9 +13,9 @@
<RootNamespace>Butterfly</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Butterfly.DataContract" Version="0.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Butterfly.Protocal\Butterfly.Protocal.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Butterfly.Protocol;
using Butterfly.DataContract.Tracing;
using Butterfly.Storage;

namespace Butterfly.Flow
Expand Down
2 changes: 1 addition & 1 deletion src/Butterfly.Core/Flow/Span/ISpanConsumer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Butterfly.Protocol;
using Butterfly.DataContract;

namespace Butterfly.Flow
{
Expand Down
2 changes: 1 addition & 1 deletion src/Butterfly.Core/Flow/Span/ISpanConsumerCallback.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Butterfly.Protocol;
using Butterfly.DataContract.Tracing;

namespace Butterfly.Flow
{
Expand Down
2 changes: 1 addition & 1 deletion src/Butterfly.Core/Flow/Span/ISpanProducer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Butterfly.Protocol;
using Butterfly.DataContract.Tracing;

namespace Butterfly.Flow
{
Expand Down
10 changes: 7 additions & 3 deletions src/Butterfly.Core/Storage/ISpanQuery.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Butterfly.Protocol;
using Butterfly.DataContract.Tracing;
using Butterfly.Storage.Query;

namespace Butterfly.Storage
{
public interface ISpanQuery
{
Task<IEnumerable<Span>> GetSpans();
Task<Span> GetSpan(string spanId);

Task<IEnumerable<Span>> GetTrace(string traceId);
Task<Trace> GetTrace(string traceId);

Task<PageResult<Trace>> GetTraces(TraceQuery traceQuery);

Task<IEnumerable<string>> GetServices();

Task<IEnumerable<Span>> GetSpanDependencies(DependencyQuery dependencyQuery);
}
}
2 changes: 1 addition & 1 deletion src/Butterfly.Core/Storage/ISpanStorage.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Butterfly.Protocol;
using Butterfly.DataContract.Tracing;

namespace Butterfly.Storage
{
Expand Down
11 changes: 11 additions & 0 deletions src/Butterfly.Core/Storage/Query/DependencyQuery.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace Butterfly.Storage.Query
{
public class DependencyQuery
{
public DateTimeOffset? StartTimestamp { get; set; }

public DateTimeOffset? FinishTimestamp { get; set; }
}
}
7 changes: 7 additions & 0 deletions src/Butterfly.Core/Storage/Query/QueryConstants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Butterfly.Storage.Query
{
public static class QueryConstants
{
public const string Service = "service.name";
}
}
4 changes: 3 additions & 1 deletion src/Butterfly.Core/Storage/Query/TraceQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Butterfly.Storage.Query
{
public class TraceQuery : PageQuery
{
public string ApplicationName { get; set; }
public string ServiceName { get; set; }

public DateTimeOffset? StartTimestamp { get; set; }

Expand All @@ -13,5 +13,7 @@ public class TraceQuery : PageQuery
public int? MinDuration { get; set; }

public int? MaxDuration { get; set; }

public string Tags { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<PropertyGroup>
<Description>
</Description>
<AssemblyTitle>Butterfly.Protocal</AssemblyTitle>
<AssemblyTitle>Butterfly.DataContract</AssemblyTitle>
<TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Butterfly.Protocal</AssemblyName>
<PackageId>Butterfly.Protocal</PackageId>
<PackageTags>Butterfly;Tracing</PackageTags>
<AssemblyName>Butterfly.DataContract</AssemblyName>
<PackageId>Butterfly.DataContract</PackageId>
<PackageTags>Butterfly;DataContract</PackageTags>
<PackageReleaseNotes>
</PackageReleaseNotes>
<RootNamespace>Butterfly.DataContract</RootNamespace>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Butterfly.Protocol
namespace Butterfly.DataContract.Tracing
{
public class Baggage
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Butterfly.Protocol
namespace Butterfly.DataContract.Tracing
{
public class Log
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Butterfly.Protocol
namespace Butterfly.DataContract.Tracing
{
public class LogField
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Butterfly.Protocol
namespace Butterfly.DataContract.Tracing
{
public class SpanReference
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Butterfly.Protocol
namespace Butterfly.DataContract.Tracing
{
public class Span
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Butterfly.Protocol
namespace Butterfly.DataContract.Tracing
{
public class Tag
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace Butterfly.Protocol
namespace Butterfly.DataContract.Tracing
{
public class Trace
{
Expand Down
Loading

0 comments on commit a11c6c1

Please sign in to comment.