From d813cabed194268de33457fd9052b0262c273f6c Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Tue, 1 Jan 2019 20:13:42 -0600 Subject: [PATCH] updated copyright headers to 2019 (#82) --- .../ZipkinFixture.cs | 33 +-- .../Program.cs | 2 +- .../Program.cs | 2 +- .../SpanBuilderSpecs.cs | 2 +- .../SpanSerializerSpecs.cs | 2 +- .../Bug25SpanTagsSpecs.cs | 2 +- .../ExternalScopeManagerSpecs.cs | 2 +- .../B3SingleHeaderFormatterSpecs.cs | 232 +++++++++--------- .../SpanContextSpecs.cs | 2 +- .../SpanSpecs.cs | 2 +- .../TraceIdSpecs.cs | 2 +- src/Petabridge.Tracing.Zipkin/Annotation.cs | 2 +- src/Petabridge.Tracing.Zipkin/Endpoint.cs | 2 +- .../Exceptions/ZipkinException.cs | 2 +- .../Exceptions/ZipkinFormatException.cs | 2 +- .../ISpanIdProvider.cs | 2 +- .../ISpanReporter.cs | 2 +- .../ITimeProvider.cs | 2 +- .../ITraceSampler.cs | 2 +- src/Petabridge.Tracing.Zipkin/IZipkinSpan.cs | 2 +- .../IZipkinSpanBuilder.cs | 2 +- .../IZipkinSpanContext.cs | 2 +- .../IZipkinTracer.cs | 2 +- .../Propagation/B3Propagator.cs | 32 +-- .../Propagation/B3SingleHeaderFormatter.cs | 49 ++-- .../Propagation/IPropagator.cs | 2 +- .../Properties/Friends.cs | 2 +- .../Reporting/Http/HttpReportingActor.cs | 2 +- .../Http/ZipkinHttpApiTransmitter.cs | 2 +- .../Http/ZipkinHttpReportingOptions.cs | 2 +- .../Reporting/Http/ZipkinHttpSpanReporter.cs | 2 +- .../Reporting/ISpanSerializer.cs | 2 +- .../Reporting/JsonSpanSerializer.cs | 2 +- .../Reporting/Kafka/KafkaReportingActor.cs | 2 +- .../Reporting/Kafka/KafkaTransmitter.cs | 2 +- .../Kafka/ZipkinKafkaReportingOptions.cs | 2 +- .../Kafka/ZipkinKafkaSpanReporter.cs | 2 +- .../Reporting/NoOp/NoOpReporter.cs | 2 +- .../Reporting/SerializationStreamManager.cs | 2 +- .../Sampling/ExternalSampling.cs | 2 +- .../Sampling/NoSampler.cs | 2 +- .../Sampling/ProbabilisticSampler.cs | 2 +- src/Petabridge.Tracing.Zipkin/Span.cs | 2 +- src/Petabridge.Tracing.Zipkin/SpanBuilder.cs | 2 +- src/Petabridge.Tracing.Zipkin/SpanContext.cs | 2 +- src/Petabridge.Tracing.Zipkin/TraceId.cs | 2 +- .../Tracers/MockZipkinTracer.cs | 2 +- src/Petabridge.Tracing.Zipkin/Tracers/NoOp.cs | 2 +- .../Tracers/NoOpZipkinSpan.cs | 2 +- .../Tracers/NoOpZipkinSpanContext.cs | 2 +- .../Util/DateTimeOffsetTimeProvider.cs | 2 +- .../Util/MicrosecondConversion.cs | 2 +- .../Util/SpanExtensions.cs | 2 +- .../Util/SpanTextFormatters.cs | 2 +- .../Util/ThreadLocalRngSpanIdProvider.cs | 2 +- src/Petabridge.Tracing.Zipkin/ZipkinTracer.cs | 2 +- .../ZipkinTracerOptions.cs | 6 +- 57 files changed, 226 insertions(+), 230 deletions(-) diff --git a/src/Petabridge.Tracing.Zipkin.Integration.Tests/ZipkinFixture.cs b/src/Petabridge.Tracing.Zipkin.Integration.Tests/ZipkinFixture.cs index 8c484bd..1c9d3e6 100644 --- a/src/Petabridge.Tracing.Zipkin.Integration.Tests/ZipkinFixture.cs +++ b/src/Petabridge.Tracing.Zipkin.Integration.Tests/ZipkinFixture.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2018 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- @@ -21,8 +21,6 @@ public class ZipkinFixture : IAsyncLifetime protected readonly string _zipkinContainerName = $"zipkin-{Guid.NewGuid():N}"; protected DockerClient _client; - public string ZipkinUrl { get; protected set; } - public ZipkinFixture() { DockerClientConfiguration config; @@ -36,12 +34,25 @@ public ZipkinFixture() _client = config.CreateClient(); } + public string ZipkinUrl { get; protected set; } + public virtual async Task InitializeAsync() { ZipkinUrl = await StartZipkinContainer(null, null); await Task.Delay(TimeSpan.FromSeconds(20)); } + public virtual async Task DisposeAsync() + { + if (_client != null) + { + await _client.Containers.StopContainerAsync(_zipkinContainerName, new ContainerStopParameters()); + await _client.Containers.RemoveContainerAsync(_zipkinContainerName, + new ContainerRemoveParameters {Force = true}); + _client.Dispose(); + } + } + protected async Task StartZipkinContainer(string[] links, string[] environmentArgs) { var images = await _client.Images.ListImagesAsync(new ImagesListParameters {MatchName = ZipkinImageName}); @@ -78,24 +89,14 @@ await _client.Containers.CreateContainerAsync(new CreateContainerParameters } } }, - Links = links, - }, Env = environmentArgs + Links = links + }, + Env = environmentArgs }); // start the container await _client.Containers.StartContainerAsync(_zipkinContainerName, new ContainerStartParameters()); return $"localhost:{zipkinHttpPort}"; } - - public virtual async Task DisposeAsync() - { - if (_client != null) - { - await _client.Containers.StopContainerAsync(_zipkinContainerName, new ContainerStopParameters()); - await _client.Containers.RemoveContainerAsync(_zipkinContainerName, - new ContainerRemoveParameters {Force = true}); - _client.Dispose(); - } - } } } \ No newline at end of file diff --git a/src/Petabridge.Tracing.Zipkin.KafkaDemo/Program.cs b/src/Petabridge.Tracing.Zipkin.KafkaDemo/Program.cs index aac5b6e..9a65acb 100644 --- a/src/Petabridge.Tracing.Zipkin.KafkaDemo/Program.cs +++ b/src/Petabridge.Tracing.Zipkin.KafkaDemo/Program.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.SimpleDemo/Program.cs b/src/Petabridge.Tracing.Zipkin.SimpleDemo/Program.cs index 17cd48a..8477090 100644 --- a/src/Petabridge.Tracing.Zipkin.SimpleDemo/Program.cs +++ b/src/Petabridge.Tracing.Zipkin.SimpleDemo/Program.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanBuilderSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanBuilderSpecs.cs index ce5f80e..73582c4 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanBuilderSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanBuilderSpecs.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanSerializerSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanSerializerSpecs.cs index 77f11d6..ba7f4d8 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanSerializerSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests.Performance/SpanSerializerSpecs.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.Tests/Bug25SpanTagsSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests/Bug25SpanTagsSpecs.cs index 430bf26..4a28436 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests/Bug25SpanTagsSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests/Bug25SpanTagsSpecs.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.Tests/ExternalScopeManagerSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests/ExternalScopeManagerSpecs.cs index f94f4bd..7f1728d 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests/ExternalScopeManagerSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests/ExternalScopeManagerSpecs.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.Tests/Propagation/B3SingleHeaderFormatterSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests/Propagation/B3SingleHeaderFormatterSpecs.cs index 358dc66..278fa71 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests/Propagation/B3SingleHeaderFormatterSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests/Propagation/B3SingleHeaderFormatterSpecs.cs @@ -1,5 +1,9 @@ -using System; -using System.Collections.Generic; +// ----------------------------------------------------------------------- +// +// Copyright (C) 2015 - 2019 Petabridge, LLC +// +// ----------------------------------------------------------------------- + using System.Text; using FluentAssertions; using Petabridge.Tracing.Zipkin.Propagation; @@ -18,101 +22,49 @@ public B3SingleHeaderFormatterSpecs() public readonly MockZipkinTracer Tracer; - [Fact(DisplayName = "Should write 64bit B3 single format header without sampling")] - public void ShouldWriteB3SingleHeaderWithoutSampling() + [Fact(DisplayName = "Should parse 64bit B3 single format header")] + public void ShouldParseB3SingleHeader() { var context = new SpanContext(new TraceId(1), 3); var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); - } - - [Fact(DisplayName = "Should write 64bit B3 single format header with sampling")] - public void ShouldWriteB3SingleHeaderWithSampling() - { - var context = new SpanContext(new TraceId(1), 3, sampled:true); - - var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1"); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); - } - - [Fact(DisplayName = "Should write 64bit B3 single format header with debug")] - public void ShouldWriteB3SingleHeaderWithDebug() - { - var context = new SpanContext(new TraceId(1), 3, debug: true); - - var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-d"); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); - } - - [Fact(DisplayName = "Should write 64bit B3 single format header with a parent id and sampling")] - public void ShouldWriteB3SingleHeaderWithParentAndSampling() - { - var context = new SpanContext(new TraceId(1), 3, parentId:Tracer.IdProvider.NextSpanId(), sampled: true); - - var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1-" + context.ParentId); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); - } - - [Fact(DisplayName = "Should write 64bit B3 single format header with a parent id only")] - public void ShouldWriteB3SingleHeaderWithParentIdOnly() - { - var context = new SpanContext(new TraceId(1), 3, parentId: "18974c44954cf23f"); + var b3HeaderParsed = ParseB3SingleFormat(b3Header); - var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-" + context.ParentId); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + b3HeaderParsed.Should().Be(context); + b3HeaderParsed.Sampled.Should().Be(context.Sampled); + b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should write 128bit B3 single format header without sampling")] - public void ShouldWriteB3SingleHeaderWithoutSampling128Bit() + [Fact(DisplayName = "Should parse 128bit B3 single format header")] + public void ShouldParseB3SingleHeader128Bit() { - var context = new SpanContext(new TraceId(1,1), 3); + var context = new SpanContext(new TraceId(1, 1), 3); var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); - } - - [Fact(DisplayName = "Should write 128bit B3 single format header with sampling")] - public void ShouldWriteB3SingleHeaderWithSampling128Bit() - { - var context = new SpanContext(new TraceId(1, 1), 3, sampled:true); + var b3HeaderParsed = ParseB3SingleFormat(b3Header); - var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1"); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + b3HeaderParsed.Should().Be(context); + b3HeaderParsed.Sampled.Should().Be(context.Sampled); + b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should write 128bit B3 single format header with sampling and parent id (max length)")] - public void ShouldWriteB3SingleHeaderWithSamplingAndParentId128Bit() + [Fact(DisplayName = "Should parse 128bit B3 single format header with parentId only")] + public void ShouldParseB3SingleHeaderParentIdOnly128Bit() { - var context = new SpanContext(new TraceId(1, 1), 3, parentId: Tracer.IdProvider.NextSpanId(), sampled: true); + var context = new SpanContext(new TraceId(1, 1), 3, "1aae83b1d7e325ce"); var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1-" + context.ParentId); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); - } - - [Fact(DisplayName = "Should write 128bit B3 single format header with parent id only")] - public void ShouldWriteB3SingleHeaderWithParentIdOnly128Bit() - { - var context = new SpanContext(new TraceId(1, 1), 3, parentId: Tracer.IdProvider.NextSpanId()); + var b3HeaderParsed = ParseB3SingleFormat(b3Header); - var b3Header = WriteB3SingleFormat(context); - b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-" + context.ParentId); - b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + b3HeaderParsed.Should().Be(context); + b3HeaderParsed.Sampled.Should().Be(context.Sampled); + b3HeaderParsed.Debug.Should().Be(context.Debug); } - - [Fact(DisplayName = "Should parse 128bit B3 single format header with sampling and parent id (max length)")] - public void ShouldParseB3SingleHeaderWithSamplingAndParentId128Bit() + [Fact(DisplayName = "Should parse 64bit B3 single format header with debug")] + public void ShouldParseB3SingleHeaderWithDebug() { - var context = new SpanContext(new TraceId(1, 1), 3, parentId: Tracer.IdProvider.NextSpanId(), sampled: true); + var context = new SpanContext(new TraceId(1), 3, debug: true); var b3Header = WriteB3SingleFormat(context); var b3HeaderParsed = ParseB3SingleFormat(b3Header); @@ -122,10 +74,10 @@ public void ShouldParseB3SingleHeaderWithSamplingAndParentId128Bit() b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should parse 128bit B3 single format header with sampling")] - public void ShouldParseB3SingleHeaderWithSampling128Bit() + [Fact(DisplayName = "Should parse 128bit B3 single format header with debug")] + public void ShouldParseB3SingleHeaderWithDebug128Bit() { - var context = new SpanContext(new TraceId(1, 1), 3, sampled: true); + var context = new SpanContext(new TraceId(1, 1), 3, debug: true); var b3Header = WriteB3SingleFormat(context); var b3HeaderParsed = ParseB3SingleFormat(b3Header); @@ -135,10 +87,10 @@ public void ShouldParseB3SingleHeaderWithSampling128Bit() b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should parse 128bit B3 single format header with debug")] - public void ShouldParseB3SingleHeaderWithDebug128Bit() + [Fact(DisplayName = "Should parse 64bit B3 single format header with parent id")] + public void ShouldParseB3SingleHeaderWithParentId() { - var context = new SpanContext(new TraceId(1, 1), 3, debug: true); + var context = new SpanContext(new TraceId(1), 3, Tracer.IdProvider.NextSpanId()); var b3Header = WriteB3SingleFormat(context); var b3HeaderParsed = ParseB3SingleFormat(b3Header); @@ -148,10 +100,10 @@ public void ShouldParseB3SingleHeaderWithDebug128Bit() b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should parse 128bit B3 single format header")] - public void ShouldParseB3SingleHeader128Bit() + [Fact(DisplayName = "Should parse 64bit B3 single format header with sampling")] + public void ShouldParseB3SingleHeaderWithSampling() { - var context = new SpanContext(new TraceId(1, 1), 3); + var context = new SpanContext(new TraceId(1), 3, sampled: true); var b3Header = WriteB3SingleFormat(context); var b3HeaderParsed = ParseB3SingleFormat(b3Header); @@ -161,10 +113,10 @@ public void ShouldParseB3SingleHeader128Bit() b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should parse 128bit B3 single format header with parentId only")] - public void ShouldParseB3SingleHeaderParentIdOnly128Bit() + [Fact(DisplayName = "Should parse 128bit B3 single format header with sampling")] + public void ShouldParseB3SingleHeaderWithSampling128Bit() { - var context = new SpanContext(new TraceId(1, 1), 3, parentId: "1aae83b1d7e325ce"); + var context = new SpanContext(new TraceId(1, 1), 3, sampled: true); var b3Header = WriteB3SingleFormat(context); var b3HeaderParsed = ParseB3SingleFormat(b3Header); @@ -177,7 +129,7 @@ public void ShouldParseB3SingleHeaderParentIdOnly128Bit() [Fact(DisplayName = "Should parse 64bit B3 single format header with sampling and parent id")] public void ShouldParseB3SingleHeaderWithSamplingAndParentId() { - var context = new SpanContext(new TraceId(1), 3, parentId: Tracer.IdProvider.NextSpanId(), sampled: true); + var context = new SpanContext(new TraceId(1), 3, Tracer.IdProvider.NextSpanId(), sampled: true); var b3Header = WriteB3SingleFormat(context); var b3HeaderParsed = ParseB3SingleFormat(b3Header); @@ -187,10 +139,11 @@ public void ShouldParseB3SingleHeaderWithSamplingAndParentId() b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should parse 64bit B3 single format header with sampling")] - public void ShouldParseB3SingleHeaderWithSampling() + + [Fact(DisplayName = "Should parse 128bit B3 single format header with sampling and parent id (max length)")] + public void ShouldParseB3SingleHeaderWithSamplingAndParentId128Bit() { - var context = new SpanContext(new TraceId(1), 3, sampled: true); + var context = new SpanContext(new TraceId(1, 1), 3, Tracer.IdProvider.NextSpanId(), sampled: true); var b3Header = WriteB3SingleFormat(context); var b3HeaderParsed = ParseB3SingleFormat(b3Header); @@ -200,43 +153,94 @@ public void ShouldParseB3SingleHeaderWithSampling() b3HeaderParsed.Debug.Should().Be(context.Debug); } - [Fact(DisplayName = "Should parse 64bit B3 single format header with debug")] - public void ShouldParseB3SingleHeaderWithDebug() + [Fact(DisplayName = "Should write 64bit B3 single format header with debug")] + public void ShouldWriteB3SingleHeaderWithDebug() { var context = new SpanContext(new TraceId(1), 3, debug: true); var b3Header = WriteB3SingleFormat(context); - var b3HeaderParsed = ParseB3SingleFormat(b3Header); - - b3HeaderParsed.Should().Be(context); - b3HeaderParsed.Sampled.Should().Be(context.Sampled); - b3HeaderParsed.Debug.Should().Be(context.Debug); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-d"); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); } - [Fact(DisplayName = "Should parse 64bit B3 single format header")] - public void ShouldParseB3SingleHeader() + [Fact(DisplayName = "Should write 64bit B3 single format header without sampling")] + public void ShouldWriteB3SingleHeaderWithoutSampling() { var context = new SpanContext(new TraceId(1), 3); var b3Header = WriteB3SingleFormat(context); - var b3HeaderParsed = ParseB3SingleFormat(b3Header); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + } - b3HeaderParsed.Should().Be(context); - b3HeaderParsed.Sampled.Should().Be(context.Sampled); - b3HeaderParsed.Debug.Should().Be(context.Debug); + [Fact(DisplayName = "Should write 128bit B3 single format header without sampling")] + public void ShouldWriteB3SingleHeaderWithoutSampling128Bit() + { + var context = new SpanContext(new TraceId(1, 1), 3); + + var b3Header = WriteB3SingleFormat(context); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); } - [Fact(DisplayName = "Should parse 64bit B3 single format header with parent id")] - public void ShouldParseB3SingleHeaderWithParentId() + [Fact(DisplayName = "Should write 64bit B3 single format header with a parent id and sampling")] + public void ShouldWriteB3SingleHeaderWithParentAndSampling() { - var context = new SpanContext(new TraceId(1), 3, parentId: Tracer.IdProvider.NextSpanId()); + var context = new SpanContext(new TraceId(1), 3, Tracer.IdProvider.NextSpanId(), sampled: true); var b3Header = WriteB3SingleFormat(context); - var b3HeaderParsed = ParseB3SingleFormat(b3Header); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1-" + context.ParentId); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + } - b3HeaderParsed.Should().Be(context); - b3HeaderParsed.Sampled.Should().Be(context.Sampled); - b3HeaderParsed.Debug.Should().Be(context.Debug); + [Fact(DisplayName = "Should write 64bit B3 single format header with a parent id only")] + public void ShouldWriteB3SingleHeaderWithParentIdOnly() + { + var context = new SpanContext(new TraceId(1), 3, "18974c44954cf23f"); + + var b3Header = WriteB3SingleFormat(context); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-" + context.ParentId); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + } + + [Fact(DisplayName = "Should write 128bit B3 single format header with parent id only")] + public void ShouldWriteB3SingleHeaderWithParentIdOnly128Bit() + { + var context = new SpanContext(new TraceId(1, 1), 3, Tracer.IdProvider.NextSpanId()); + + var b3Header = WriteB3SingleFormat(context); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-" + context.ParentId); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + } + + [Fact(DisplayName = "Should write 64bit B3 single format header with sampling")] + public void ShouldWriteB3SingleHeaderWithSampling() + { + var context = new SpanContext(new TraceId(1), 3, sampled: true); + + var b3Header = WriteB3SingleFormat(context); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1"); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + } + + [Fact(DisplayName = "Should write 128bit B3 single format header with sampling")] + public void ShouldWriteB3SingleHeaderWithSampling128Bit() + { + var context = new SpanContext(new TraceId(1, 1), 3, sampled: true); + + var b3Header = WriteB3SingleFormat(context); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1"); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); + } + + [Fact(DisplayName = "Should write 128bit B3 single format header with sampling and parent id (max length)")] + public void ShouldWriteB3SingleHeaderWithSamplingAndParentId128Bit() + { + var context = new SpanContext(new TraceId(1, 1), 3, Tracer.IdProvider.NextSpanId(), sampled: true); + + var b3Header = WriteB3SingleFormat(context); + b3Header.Should().Be(context.TraceId + "-" + context.SpanId + "-1-" + context.ParentId); + b3Header.Should().Be(Encoding.UTF8.GetString(WriteB3SingleFormatAsBytes(context))); } } -} +} \ No newline at end of file diff --git a/src/Petabridge.Tracing.Zipkin.Tests/SpanContextSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests/SpanContextSpecs.cs index 5000379..1c82e3f 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests/SpanContextSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests/SpanContextSpecs.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.Tests/SpanSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests/SpanSpecs.cs index 8f3fc75..016feae 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests/SpanSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests/SpanSpecs.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin.Tests/TraceIdSpecs.cs b/src/Petabridge.Tracing.Zipkin.Tests/TraceIdSpecs.cs index 65f677b..060d8a6 100644 --- a/src/Petabridge.Tracing.Zipkin.Tests/TraceIdSpecs.cs +++ b/src/Petabridge.Tracing.Zipkin.Tests/TraceIdSpecs.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Annotation.cs b/src/Petabridge.Tracing.Zipkin/Annotation.cs index 2139a2e..f0056df 100644 --- a/src/Petabridge.Tracing.Zipkin/Annotation.cs +++ b/src/Petabridge.Tracing.Zipkin/Annotation.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Endpoint.cs b/src/Petabridge.Tracing.Zipkin/Endpoint.cs index e73a1e6..a73be6f 100644 --- a/src/Petabridge.Tracing.Zipkin/Endpoint.cs +++ b/src/Petabridge.Tracing.Zipkin/Endpoint.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinException.cs b/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinException.cs index bb3de41..e45efcb 100644 --- a/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinException.cs +++ b/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinException.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinFormatException.cs b/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinFormatException.cs index 5321a84..de3b051 100644 --- a/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinFormatException.cs +++ b/src/Petabridge.Tracing.Zipkin/Exceptions/ZipkinFormatException.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/ISpanIdProvider.cs b/src/Petabridge.Tracing.Zipkin/ISpanIdProvider.cs index f6daa1b..a7599cd 100644 --- a/src/Petabridge.Tracing.Zipkin/ISpanIdProvider.cs +++ b/src/Petabridge.Tracing.Zipkin/ISpanIdProvider.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/ISpanReporter.cs b/src/Petabridge.Tracing.Zipkin/ISpanReporter.cs index ea5b955..75afc7b 100644 --- a/src/Petabridge.Tracing.Zipkin/ISpanReporter.cs +++ b/src/Petabridge.Tracing.Zipkin/ISpanReporter.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/ITimeProvider.cs b/src/Petabridge.Tracing.Zipkin/ITimeProvider.cs index 840f9f9..cdccdfc 100644 --- a/src/Petabridge.Tracing.Zipkin/ITimeProvider.cs +++ b/src/Petabridge.Tracing.Zipkin/ITimeProvider.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/ITraceSampler.cs b/src/Petabridge.Tracing.Zipkin/ITraceSampler.cs index f21a4fb..3f0c80b 100644 --- a/src/Petabridge.Tracing.Zipkin/ITraceSampler.cs +++ b/src/Petabridge.Tracing.Zipkin/ITraceSampler.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/IZipkinSpan.cs b/src/Petabridge.Tracing.Zipkin/IZipkinSpan.cs index ac2d6c8..e6cefdd 100644 --- a/src/Petabridge.Tracing.Zipkin/IZipkinSpan.cs +++ b/src/Petabridge.Tracing.Zipkin/IZipkinSpan.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/IZipkinSpanBuilder.cs b/src/Petabridge.Tracing.Zipkin/IZipkinSpanBuilder.cs index 373f5cc..caf6d21 100644 --- a/src/Petabridge.Tracing.Zipkin/IZipkinSpanBuilder.cs +++ b/src/Petabridge.Tracing.Zipkin/IZipkinSpanBuilder.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/IZipkinSpanContext.cs b/src/Petabridge.Tracing.Zipkin/IZipkinSpanContext.cs index 4037a62..d4c12e2 100644 --- a/src/Petabridge.Tracing.Zipkin/IZipkinSpanContext.cs +++ b/src/Petabridge.Tracing.Zipkin/IZipkinSpanContext.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/IZipkinTracer.cs b/src/Petabridge.Tracing.Zipkin/IZipkinTracer.cs index c84ff17..e72cc72 100644 --- a/src/Petabridge.Tracing.Zipkin/IZipkinTracer.cs +++ b/src/Petabridge.Tracing.Zipkin/IZipkinTracer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Propagation/B3Propagator.cs b/src/Petabridge.Tracing.Zipkin/Propagation/B3Propagator.cs index 538680c..ea6ca40 100644 --- a/src/Petabridge.Tracing.Zipkin/Propagation/B3Propagator.cs +++ b/src/Petabridge.Tracing.Zipkin/Propagation/B3Propagator.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- @@ -11,10 +11,10 @@ namespace Petabridge.Tracing.Zipkin.Propagation { /// - /// Implements the "single header" B3 propagation format + /// Implements the "single header" B3 propagation format /// /// - /// See https://github.com/openzipkin/b3-propagation/issues/21 for full specification + /// See https://github.com/openzipkin/b3-propagation/issues/21 for full specification /// public sealed class B3SingleHeaderPropagator : IPropagator { @@ -22,7 +22,7 @@ public sealed class B3SingleHeaderPropagator : IPropagator public void Inject(SpanContext context, ITextMap carrier) { - carrier.Set(B3SingleHeader, B3SingleHeaderFormatter.WriteB3SingleFormat(context)); + carrier.Set(B3SingleHeader, B3SingleHeaderFormatter.WriteB3SingleFormat(context)); } public SpanContext Extract(ITextMap carrier) @@ -43,33 +43,34 @@ public SpanContext Extract(ITextMap carrier) /// public sealed class B3Propagator : IPropagator { + internal const string B3TraceId = "x-b3-traceid"; + internal const string B3SpanId = "x-b3-spanid"; + internal const string B3ParentId = "x-b3-parentspanid"; + internal const string B3Sampled = "x-b3-sampled"; + internal const string B3Debug = "x-b3-flags"; private readonly B3SingleHeaderPropagator _singleHeaderPropagator = new B3SingleHeaderPropagator(); private readonly bool _useB3SingleHeader; /// /// - /// Default constructor for the B3 Propagator. Doesn't use single-header format by default. + /// Default constructor for the B3 Propagator. Doesn't use single-header format by default. /// public B3Propagator() : this(false) { - } /// - /// Creates a new instance of the B3 Propagator. + /// Creates a new instance of the B3 Propagator. /// - /// When set to true, enables the propagator to use the B3 single header propagation. + /// + /// When set to true, enables the propagator to use the B3 single header + /// propagation. + /// public B3Propagator(bool useB3SingleHeader) { _useB3SingleHeader = useB3SingleHeader; } - internal const string B3TraceId = "x-b3-traceid"; - internal const string B3SpanId = "x-b3-spanid"; - internal const string B3ParentId = "x-b3-parentspanid"; - internal const string B3Sampled = "x-b3-sampled"; - internal const string B3Debug = "x-b3-flags"; - public void Inject(SpanContext context, ITextMap carrier) { if (_useB3SingleHeader) @@ -131,7 +132,8 @@ public SpanContext Extract(ITextMap carrier) debug = true; break; case B3Sampled: - if (entry.Value.Equals("1") || entry.Value.ToLowerInvariant().Equals("true")) // support older tracers https://github.com/petabridge/Petabridge.Tracing.Zipkin/issues/72 + if (entry.Value.Equals("1") || entry.Value.ToLowerInvariant().Equals("true") + ) // support older tracers https://github.com/petabridge/Petabridge.Tracing.Zipkin/issues/72 sampled = true; break; } diff --git a/src/Petabridge.Tracing.Zipkin/Propagation/B3SingleHeaderFormatter.cs b/src/Petabridge.Tracing.Zipkin/Propagation/B3SingleHeaderFormatter.cs index ddb6d45..5dd61a6 100644 --- a/src/Petabridge.Tracing.Zipkin/Propagation/B3SingleHeaderFormatter.cs +++ b/src/Petabridge.Tracing.Zipkin/Propagation/B3SingleHeaderFormatter.cs @@ -1,23 +1,30 @@ -using System; +// ----------------------------------------------------------------------- +// +// Copyright (C) 2015 - 2019 Petabridge, LLC +// +// ----------------------------------------------------------------------- + +using System; using System.Text; using System.Threading; namespace Petabridge.Tracing.Zipkin.Propagation { /// - /// Used for parsing the B3 "single header" format + /// Used for parsing the B3 "single header" format /// /// - /// See https://github.com/openzipkin/b3-propagation/issues/21 for rationale. + /// See https://github.com/openzipkin/b3-propagation/issues/21 for rationale. /// public static class B3SingleHeaderFormatter { /// - /// The maximum length of a fully specified B3 single length header + /// The maximum length of a fully specified B3 single length header /// public const int FORMAT_MAX_LENGTH = 32 + 1 + 16 + 3 + 16; // traceid128-spanid-1-parentid - private static readonly ThreadLocal CHAR_ARRAY = new ThreadLocal(() => new char[FORMAT_MAX_LENGTH]); + private static readonly ThreadLocal CHAR_ARRAY = + new ThreadLocal(() => new char[FORMAT_MAX_LENGTH]); public static string WriteB3SingleFormat(SpanContext context) { @@ -38,9 +45,7 @@ private static int WriteB3SingleFormatHeader(SpanContext context, char[] result) var pos = 0; context.TraceId.CopyTo(0, result, pos, context.TraceId.Length); if (context.ZipkinTraceId.Is128Bit) - { pos += 16; - } pos += 16; result[pos++] = '-'; context.SpanId.CopyTo(0, result, pos, context.SpanId.Length); @@ -71,26 +76,17 @@ public static SpanContext ParseB3SingleFormat(string b3) private static SpanContext ParseB3SingleFormat(char[] b3, int begin, int count) { if (count == 0) - { return null; - } var pos = begin; if (pos + 1 == count) // sampling flags only - { - // TODO: add support for sampling flags only return null; - } // At this point we expect at least a traceid-spanid pair if (count < 16 + 1 + 16) - { throw new ArgumentOutOfRangeException(nameof(b3), $"Invalid input: truncated {new string(b3)}"); - } if (count > FORMAT_MAX_LENGTH) - { throw new ArgumentOutOfRangeException(nameof(b3), $"Invalid input: too long {new string(b3)}"); - } string traceId = null; if (b3[pos + 32] == '-') @@ -106,16 +102,14 @@ private static SpanContext ParseB3SingleFormat(char[] b3, int begin, int count) TraceId trace; if (!TraceId.TryParse(traceId, out trace)) - { - throw new ArgumentOutOfRangeException("traceId", $"Invalid input: expected a 16 or 32 lower hex trace ID at offset 0 [{traceId}]"); - } + throw new ArgumentOutOfRangeException("traceId", + $"Invalid input: expected a 16 or 32 lower hex trace ID at offset 0 [{traceId}]"); if (!CheckHyphen(b3, pos++)) return null; if (pos + 16 > count) - { - throw new ArgumentOutOfRangeException("spanId", $"Invalid input: expected a 16 span id at offset {pos}"); - } + throw new ArgumentOutOfRangeException("spanId", + $"Invalid input: expected a 16 span id at offset {pos}"); var spanId = new string(b3, pos, 16); pos += 16; // spanid @@ -126,9 +120,7 @@ private static SpanContext ParseB3SingleFormat(char[] b3, int begin, int count) if (count > pos) // sampling flags or debug { if (count == pos + 1) // sampling flag didn't get included - { throw new ArgumentOutOfRangeException(nameof(b3), "Invalid input: truncated"); - } if (!CheckHyphen(b3, pos++)) return null; @@ -152,9 +144,7 @@ private static SpanContext ParseB3SingleFormat(char[] b3, int begin, int count) pos++; // need to account for the flag if (!CheckHyphen(b3, pos++)) - { return new SpanContext(trace, spanId, null, debug, sampled); - } } @@ -162,9 +152,8 @@ private static SpanContext ParseB3SingleFormat(char[] b3, int begin, int count) { //If we've made it here, there should be a parentId if (pos + 16 > count) - { - throw new ArgumentOutOfRangeException("parentId", $"Invalid input: expected a 16 parent id at offset {pos}"); - } + throw new ArgumentOutOfRangeException("parentId", + $"Invalid input: expected a 16 parent id at offset {pos}"); parentId = new string(b3, pos, 16); } } @@ -172,7 +161,7 @@ private static SpanContext ParseB3SingleFormat(char[] b3, int begin, int count) return new SpanContext(trace, spanId, parentId, debug, sampled); } - static bool CheckHyphen(char[] b3, int pos) + private static bool CheckHyphen(char[] b3, int pos) { if (b3.Length > pos && b3[pos] == '-') return true; return false; diff --git a/src/Petabridge.Tracing.Zipkin/Propagation/IPropagator.cs b/src/Petabridge.Tracing.Zipkin/Propagation/IPropagator.cs index 2edf83d..38c1ce3 100644 --- a/src/Petabridge.Tracing.Zipkin/Propagation/IPropagator.cs +++ b/src/Petabridge.Tracing.Zipkin/Propagation/IPropagator.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Properties/Friends.cs b/src/Petabridge.Tracing.Zipkin/Properties/Friends.cs index e7ab55d..d14f56e 100644 --- a/src/Petabridge.Tracing.Zipkin/Properties/Friends.cs +++ b/src/Petabridge.Tracing.Zipkin/Properties/Friends.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Http/HttpReportingActor.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Http/HttpReportingActor.cs index efab82b..ebd588d 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Http/HttpReportingActor.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Http/HttpReportingActor.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpApiTransmitter.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpApiTransmitter.cs index 01041e0..b7767ab 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpApiTransmitter.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpApiTransmitter.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpReportingOptions.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpReportingOptions.cs index 30d86e6..3d9e724 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpReportingOptions.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpReportingOptions.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpSpanReporter.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpSpanReporter.cs index 4f41856..623f055 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpSpanReporter.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Http/ZipkinHttpSpanReporter.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/ISpanSerializer.cs b/src/Petabridge.Tracing.Zipkin/Reporting/ISpanSerializer.cs index 861026f..f9acf58 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/ISpanSerializer.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/ISpanSerializer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/JsonSpanSerializer.cs b/src/Petabridge.Tracing.Zipkin/Reporting/JsonSpanSerializer.cs index 5dc26cf..54b6c1e 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/JsonSpanSerializer.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/JsonSpanSerializer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaReportingActor.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaReportingActor.cs index eeb097a..ccd81ec 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaReportingActor.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaReportingActor.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaTransmitter.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaTransmitter.cs index ef0a1b2..cf0fea4 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaTransmitter.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/KafkaTransmitter.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaReportingOptions.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaReportingOptions.cs index 5921ea9..bcf26e0 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaReportingOptions.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaReportingOptions.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaSpanReporter.cs b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaSpanReporter.cs index 93fa6e0..b2b2557 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaSpanReporter.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/Kafka/ZipkinKafkaSpanReporter.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/NoOp/NoOpReporter.cs b/src/Petabridge.Tracing.Zipkin/Reporting/NoOp/NoOpReporter.cs index efbabdf..5fb09d9 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/NoOp/NoOpReporter.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/NoOp/NoOpReporter.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Reporting/SerializationStreamManager.cs b/src/Petabridge.Tracing.Zipkin/Reporting/SerializationStreamManager.cs index 2a58018..75c9345 100644 --- a/src/Petabridge.Tracing.Zipkin/Reporting/SerializationStreamManager.cs +++ b/src/Petabridge.Tracing.Zipkin/Reporting/SerializationStreamManager.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Sampling/ExternalSampling.cs b/src/Petabridge.Tracing.Zipkin/Sampling/ExternalSampling.cs index 5008917..50c5be1 100644 --- a/src/Petabridge.Tracing.Zipkin/Sampling/ExternalSampling.cs +++ b/src/Petabridge.Tracing.Zipkin/Sampling/ExternalSampling.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Sampling/NoSampler.cs b/src/Petabridge.Tracing.Zipkin/Sampling/NoSampler.cs index 5979257..7b27917 100644 --- a/src/Petabridge.Tracing.Zipkin/Sampling/NoSampler.cs +++ b/src/Petabridge.Tracing.Zipkin/Sampling/NoSampler.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Sampling/ProbabilisticSampler.cs b/src/Petabridge.Tracing.Zipkin/Sampling/ProbabilisticSampler.cs index 0ca5939..9ab46de 100644 --- a/src/Petabridge.Tracing.Zipkin/Sampling/ProbabilisticSampler.cs +++ b/src/Petabridge.Tracing.Zipkin/Sampling/ProbabilisticSampler.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Span.cs b/src/Petabridge.Tracing.Zipkin/Span.cs index c6de7a2..fe66539 100644 --- a/src/Petabridge.Tracing.Zipkin/Span.cs +++ b/src/Petabridge.Tracing.Zipkin/Span.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/SpanBuilder.cs b/src/Petabridge.Tracing.Zipkin/SpanBuilder.cs index ec307bc..7ddfb3b 100644 --- a/src/Petabridge.Tracing.Zipkin/SpanBuilder.cs +++ b/src/Petabridge.Tracing.Zipkin/SpanBuilder.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/SpanContext.cs b/src/Petabridge.Tracing.Zipkin/SpanContext.cs index 0bef745..391e625 100644 --- a/src/Petabridge.Tracing.Zipkin/SpanContext.cs +++ b/src/Petabridge.Tracing.Zipkin/SpanContext.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/TraceId.cs b/src/Petabridge.Tracing.Zipkin/TraceId.cs index 28e8d89..4bae2e2 100644 --- a/src/Petabridge.Tracing.Zipkin/TraceId.cs +++ b/src/Petabridge.Tracing.Zipkin/TraceId.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Tracers/MockZipkinTracer.cs b/src/Petabridge.Tracing.Zipkin/Tracers/MockZipkinTracer.cs index 492b875..fb99e5c 100644 --- a/src/Petabridge.Tracing.Zipkin/Tracers/MockZipkinTracer.cs +++ b/src/Petabridge.Tracing.Zipkin/Tracers/MockZipkinTracer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Tracers/NoOp.cs b/src/Petabridge.Tracing.Zipkin/Tracers/NoOp.cs index add2807..534a6b6 100644 --- a/src/Petabridge.Tracing.Zipkin/Tracers/NoOp.cs +++ b/src/Petabridge.Tracing.Zipkin/Tracers/NoOp.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpan.cs b/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpan.cs index 4179b91..6ad911f 100644 --- a/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpan.cs +++ b/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpan.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpanContext.cs b/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpanContext.cs index d572c6c..066d37c 100644 --- a/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpanContext.cs +++ b/src/Petabridge.Tracing.Zipkin/Tracers/NoOpZipkinSpanContext.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Util/DateTimeOffsetTimeProvider.cs b/src/Petabridge.Tracing.Zipkin/Util/DateTimeOffsetTimeProvider.cs index ce6dbd0..b743072 100644 --- a/src/Petabridge.Tracing.Zipkin/Util/DateTimeOffsetTimeProvider.cs +++ b/src/Petabridge.Tracing.Zipkin/Util/DateTimeOffsetTimeProvider.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Util/MicrosecondConversion.cs b/src/Petabridge.Tracing.Zipkin/Util/MicrosecondConversion.cs index 190057d..0ca7c40 100644 --- a/src/Petabridge.Tracing.Zipkin/Util/MicrosecondConversion.cs +++ b/src/Petabridge.Tracing.Zipkin/Util/MicrosecondConversion.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Util/SpanExtensions.cs b/src/Petabridge.Tracing.Zipkin/Util/SpanExtensions.cs index ff5478d..8249a15 100644 --- a/src/Petabridge.Tracing.Zipkin/Util/SpanExtensions.cs +++ b/src/Petabridge.Tracing.Zipkin/Util/SpanExtensions.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Util/SpanTextFormatters.cs b/src/Petabridge.Tracing.Zipkin/Util/SpanTextFormatters.cs index e348ec1..b6f564d 100644 --- a/src/Petabridge.Tracing.Zipkin/Util/SpanTextFormatters.cs +++ b/src/Petabridge.Tracing.Zipkin/Util/SpanTextFormatters.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/Util/ThreadLocalRngSpanIdProvider.cs b/src/Petabridge.Tracing.Zipkin/Util/ThreadLocalRngSpanIdProvider.cs index 3e084ac..4a2a23b 100644 --- a/src/Petabridge.Tracing.Zipkin/Util/ThreadLocalRngSpanIdProvider.cs +++ b/src/Petabridge.Tracing.Zipkin/Util/ThreadLocalRngSpanIdProvider.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/ZipkinTracer.cs b/src/Petabridge.Tracing.Zipkin/ZipkinTracer.cs index b02bc8b..513172b 100644 --- a/src/Petabridge.Tracing.Zipkin/ZipkinTracer.cs +++ b/src/Petabridge.Tracing.Zipkin/ZipkinTracer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- diff --git a/src/Petabridge.Tracing.Zipkin/ZipkinTracerOptions.cs b/src/Petabridge.Tracing.Zipkin/ZipkinTracerOptions.cs index 1d8633b..fd99620 100644 --- a/src/Petabridge.Tracing.Zipkin/ZipkinTracerOptions.cs +++ b/src/Petabridge.Tracing.Zipkin/ZipkinTracerOptions.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (C) 2015 - 2018 Petabridge, LLC +// Copyright (C) 2015 - 2019 Petabridge, LLC // // ----------------------------------------------------------------------- @@ -82,8 +82,8 @@ public ZipkinTracerOptions(Endpoint localEndpoint, ISpanReporter reporter) public ITraceSampler Sampler { get; set; } /// - /// The OpenTracing used for injecting and extracing Zipkin context - /// across process boundaries. Defaults to . + /// The OpenTracing used for injecting and extracing Zipkin context + /// across process boundaries. Defaults to . /// public IPropagator Propagator { get; set; }