* Fixed boxing of Link & SpanContext structs in Jaeger.
* Enumerations in Jaeger are now allocation free.
* Removed a few spots where allocations were happening for no reason.
* Refactoring.
* Refactor.
* Turned off TieredCompilation for benchmarks because it can lead to false-positives when running through VS.
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* remove binary format
* remove redundnt assert in TracerShimTests
* add null tracer and text format assertion
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* Initial work.
* First complete version of Jaeger with perf improvements.
* Added JaegerExporter benchmarks.
* More performance revisions.
* ValueTask perf improvements.
* Missed a couple tasks.
* Removed null check against struct.
* Tweaked how structs are used.
* Figured out why the structs were eating more memory. Fixed up unit tests.
* Reverted change to ToJaegerSpan extension signature.
* Fixed JaegerUdpBatcher not calling CloseAsync in dispose, fixed SpanExporters not being disposed.
* Reference System.Threading.Tasks.Extensions for net46 & netstandard2.0 builds of Thirft to add in ValueTask.
* Removed the fork of Thrift in favor of the official package.
* Increased number of spans per iteration in jaeger benchmarks. Switched ApacheThrift to PrivateAssets=all in jaeger exporter project.
* New algorithm for memory management.
* Fixed double-allocation of tags.
* Immutable structs. Added cancellationToken to IJaegerClient interface.
* Added lists that can be backed be pooled buffers.
* Everything in implementation folder is now internal.
* Return ref from PooledList indexer.
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* add support for array attributes
* add support for IEnumerable
* use ToString() for unsupported attribute types
* use try/catch when iterating attribute value
* add note enumerations may be iterabled more than once
* move enumeration note to parameter description
* fix typo in SetAttribute param description
Co-Authored-By: Liudmila Molkova <lmolkova@microsoft.com>
* remove null check for attribute value
Co-Authored-By: Liudmila Molkova <lmolkova@microsoft.com>
* add missing using statement for IEnumerable
* fix build warnings from new arrayy tests
* revert calling ToString() for invalod attribute value types
Co-authored-by: Liudmila Molkova <lmolkova@microsoft.com>
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* Keys with digits are still accepted
* add a test
* Update TracestateUtilsTests.cs
no need to test with a value ending with a white space
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* Updated JaegerExporter to send a batch per remote service so that the UI can correctly detect dependencies for non-instrumented external calls.
* Code review.
* Fixed broken batch size calculation.
* Moved lock above try.
* Fixed failing unit test.
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* Switched to System.Text.Json for .NET Standard 2.0 target. Added caching of ZipkinEndpoints. Added support for sending RemoteEndpoint to Zipkin API.
* Code review feedback.
* Code review.
* Zipkin performance improvements.
* Made json header static.
* Removed debug code.
* Bumped up the numbers of spans in benchmark to get more consistent results.
* Code review.
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* Fixed HttpHandlerDiagnosticListener so it doesn't clear status description after it sets it. Updated JaegerExporter to send ot.status_code & ot.status_description.
* Code review.
* Code review.
* Modded the Jaeger Exporter to also look at Resources for ServiceName & ProcessTags.
* You can now pass additional attributes to CreateServiceResource helper. Moved "service.*" resource strings into constants.
* Code review feedback.
* Code review feedback.
* Code review feedback.
* Removed nested dictionary.
Co-authored-by: Liudmila Molkova <lmolkova@microsoft.com>
* Classes scaffolding for zPages
Implemented Http Server to create HTML that displays span count using SimpleSpanProcessor
* incorporating review comments
- made ContentType const in zpages stats builder
- modified return statements in zpages exporter
- removed implementation folder from ZPages.csproj
- changed default uri for zpages test application
- changed data type of spanCount to long, and doing Interlocked.Increment when span starts
* fixing minor error
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* [JaegerExporter] Periodically flush undelivered Spans
A Span will never be delivered if the maximum batch size isn't hit or the
component is not torn down. We need to flush these undelivered Spans.
The timer is enabled if a Span is batched up and not sent and then disabled
the next time the batch is flushed.
* Forgot to Dispose the timer
* Switching to SemaphoreSlim for the async aware lock
* add extension methods to register prometheus exporter
- IApplicationBuilder
- WebHostBuilder
* update http and hosting abstractions packages to 2.2.0
* fix web host extensions
* extract metricHttpServer from PrometheusExporter
* remove moq dependency in promethus tests
* remove IApplicationBuilder and IWebHostBuilder prometheus extensions
* revert changes to prometheus csproj
* rename MetricsHttpServer to PrometheusExporterMetricsHttpServer
* add IDisposeable to PrometheusExporterMetricsHttpServer
* refactor PrometheusExporterMetricsHttpServer to not require PromethusOptions as param
* move CancellationToken from constructor to Start method
* check http servere is both not null and listening before calling stop
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
The TraceId translation to High/Low longs handles endianess but the SpanId did not.
I also took the opportunity to switch to Span<byte> and reinterpret cast to eliminate byte array allocations.
Verified speed + 0 allocations using Benchmark
Co-authored-by: Liudmila Molkova <lmolkova@microsoft.com>
* Add SpanData public constructor for out-of-band spans and testing
* Add span data test
* fix tests
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
* add generic logger exporter
* remove string builder entry in ExportAsync
* use logger spans
* add null checking for attriute and events
* rename LoggingExporter to LoggerExporter
* refactor LoggerExporter into ConsoleExporter
reduces potential risk of depending on ILogger and having to maintain / use incorrectly. This exporter is designed during learning / debug scenarios.
* add experimental to package tags
* rename LoggingOptions to ConsoleOptions
* refactor ConsoleExporter to use System.Text.JsonSerializer
- increases minimum framework version to `net461`
* add readme to ConsoleExporter
* update tracer name to be console-test
* write each span JSOM directly to Console instad of using StringBuilder
* update ConsoleExporter to use SpanData
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>