moved Stats away to SDK (#121)

This commit is contained in:
Sergey Kanzhelev 2019-06-25 22:47:56 -07:00 committed by GitHub
parent f6e400e02c
commit cfd233c9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 13 additions and 13 deletions

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\OpenTelemetry.Abstractions\OpenTelemetry.Abstractions.csproj" />
<ProjectReference Include="..\OpenTelemetry\OpenTelemetry.csproj" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.8.0-beta1" />
</ItemGroup>
</Project>

View File

@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\OpenTelemetry.Abstractions\OpenTelemetry.Abstractions.csproj" />
<ProjectReference Include="..\OpenTelemetry\OpenTelemetry.csproj" />
</ItemGroup>
</Project>

View File

@ -89,12 +89,12 @@ namespace OpenTelemetry.Exporter.Stackdriver.Implementation
return labelDescriptor;
}
public static Distribution CreateDistribution(
public static Google.Api.Distribution CreateDistribution(
IDistributionData distributionData,
IBucketBoundaries bucketBoundaries)
{
var bucketOptions = bucketBoundaries.ToBucketOptions();
var distribution = new Distribution
var distribution = new Google.Api.Distribution
{
BucketOptions = bucketOptions,
BucketCounts = { CreateBucketCounts(distributionData.BucketCounts) },

View File

@ -37,12 +37,12 @@ namespace OpenTelemetry.Exporter.Stackdriver.Implementation
/// <param name="spanData">Span in OpenTelemetry format</param>
/// <param name="projectId">Google Cloud Platform Project Id</param>
/// <returns></returns>
public static Span ToSpan(this SpanData spanData, string projectId)
public static Google.Cloud.Trace.V2.Span ToSpan(this SpanData spanData, string projectId)
{
var spanId = spanData.Context.SpanId.ToLowerBase16();
// Base span settings
var span = new Span
var span = new Google.Cloud.Trace.V2.Span
{
SpanName = new SpanName(projectId, spanData.Context.TraceId.ToLowerBase16(), spanId),
SpanId = spanId,
@ -63,7 +63,7 @@ namespace OpenTelemetry.Exporter.Stackdriver.Implementation
// Span Links
if (spanData.Links != null)
{
span.Links = new Span.Types.Links
span.Links = new Google.Cloud.Trace.V2.Span.Types.Links
{
DroppedLinksCount = spanData.Links.DroppedLinksCount,
Link = { spanData.Links.Links.Select(l => l.ToLink()) }
@ -73,7 +73,7 @@ namespace OpenTelemetry.Exporter.Stackdriver.Implementation
// Span Attributes
if (spanData.Attributes != null)
{
span.Attributes = new Span.Types.Attributes
span.Attributes = new Google.Cloud.Trace.V2.Span.Types.Attributes
{
DroppedAttributesCount = spanData.Attributes != null ? spanData.Attributes.DroppedAttributesCount : 0,
@ -86,15 +86,15 @@ namespace OpenTelemetry.Exporter.Stackdriver.Implementation
return span;
}
public static Span.Types.Link ToLink(this ILink link)
public static Google.Cloud.Trace.V2.Span.Types.Link ToLink(this ILink link)
{
var ret = new Span.Types.Link();
var ret = new Google.Cloud.Trace.V2.Span.Types.Link();
ret.SpanId = link.Context.SpanId.ToLowerBase16();
ret.TraceId = link.Context.TraceId.ToLowerBase16();
if (link.Attributes != null)
{
ret.Attributes = new Span.Types.Attributes
ret.Attributes = new Google.Cloud.Trace.V2.Span.Types.Attributes
{
DroppedAttributesCount = OpenTelemetry.Trace.Config.TraceParams.Default.MaxNumberOfAttributes - link.Attributes.Count,

View File

@ -17,6 +17,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenTelemetry.Abstractions\OpenTelemetry.Abstractions.csproj" />
<ProjectReference Include="..\OpenTelemetry\OpenTelemetry.csproj" />
</ItemGroup>
</Project>