Commit Graph

294 Commits

Author SHA1 Message Date
Mikel Blanchard f93df2bbea
AspNet request collector (#543)
* Added a collector for incoming ASP.NET requests.

* Unit tests.

* Code review.

* Attempting to get windows build working.

* Attempting to fix build.

* Attempting to get the build working.

* Attempting to get the build working.

* Attempting to fix the build.

* Attempting to get Linux build working.

* Attempting to get linux build working.

* Attempting to get linux build working.

* Attempting to get build working.

* Attempting to get all tests running on windows.

* Attempting to get tests running on windows.

* Attempting to get the myget build working.

* Indention fix in myget yml.

* Code review.

* Code review.

* Code review.

* Code review.

* Code review.
2020-03-20 19:59:45 -07:00
Mikel Blanchard 3dbecfd167
Fixed Jaeger ApacheThrift reference not flowing to parents. (#545) 2020-03-18 08:56:04 -07:00
Hananiel Sarella 5b719831e0
Add middleware for Prometheus Exporter (#541)
* Add middleware for Prometheus Exporter

* Address PR comments

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-17 14:40:19 -07:00
Mikel Blanchard c1d72e6927
Add Sql Collector (Part 2) (#536)
* Picking up where alexvaluyskiy left off with the SqlClientCollector. Worked on PR feedback. Added unit tests.

* Updated README.

* Fixed inconsistent comments.

* Code review.

* Code review #2.

* More code review.

* Code review feedback.

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-17 13:37:01 -07:00
Mikel Blanchard 1c82e6aaa3
Fixed up allocations in JaegerUdpClient. (#537)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-17 13:26:53 -07:00
Cijo Thomas de3b0493a5
Add observer instrument (#539)
* Adds MinMaxSumCount aggregator. Refactored aggregators to have common interface to emit export record.

* Remove unwanted namespace import

* remove implementation folder which is empty now

* Address PR comments. Add unit test and TODOs

* Add observe instrument with callback faciltiy

* Address comments.

* basic oberver test

* Added double observer

* Test fpr observer

* PR review comments addressed
2020-03-16 15:29:08 -07:00
Liz Fong-Jones 6fcfccd819
add honeycomb exporter (#538)
* add honeycomb exporter to README
2020-03-12 07:53:26 -04:00
Cijo Thomas 8efdd0a42d
Adds MinMaxSumCount aggregator. (#529)
* Adds MinMaxSumCount aggregator. Refactored aggregators to have common interface to emit export record.

* Remove unwanted namespace import

* remove implementation folder which is empty now

* Address PR comments. Add unit test and TODOs

* Address comments.
2020-03-11 10:55:34 -07:00
Mike Goldsmith adfe4b754c
Add support for B3 single header (#533)
* add support for combined single b3 header

* rename combined header name

* fix typo in method name
2020-03-11 10:43:23 -07:00
Łukasz Pyrzyk 6ea1238117
New using syntax (#528)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-06 10:07:19 -08:00
Mikel Blanchard 1420a100ce
JaegerExporter: Performance Improvements 2 (#524)
* 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>
2020-03-05 21:51:02 -08:00
Sergey Kanzhelev d966b19d00
removing unused variables in zipkin DoPostAsync method (#521)
* removing unused variables in zipkin DoPostAsync method

* Removing unused variable

* removing unused using

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-05 12:47:13 -08:00
Sergey Kanzhelev d48aad6290
Enabled C# 8 (#527) 2020-03-05 09:52:32 -08:00
Sergey Kanzhelev 3138d14613
rename samplers and Decision to SamplingResult (#523)
* rename samplers and Decision to SamplingResult

* forgotten rename to make tests pass
2020-03-05 09:30:48 -08:00
Sergey Kanzhelev e71d37dc16
updating version of dotnet in the azure pipeline (#522)
adding package type property in yml

updating task type

updating linux and windows pipelines
2020-03-04 14:48:28 -08:00
Sergey Kanzhelev a6c7876cab
fixed timeout issue (#520) 2020-03-04 11:40:42 -08:00
Sergey Kanzhelev 9b24562c90
Removed redundant casts and comparisons from PutHttpStatusCode (#515)
* Removed redundant casts

* Setting status to Unknown by default

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-04 11:12:22 -08:00
Sergey Kanzhelev 771f744682
Rename Handles to Bound Instruments (OTEP 70) (#519) 2020-03-04 10:06:51 -08:00
Mike Goldsmith cfd198429c
Remove binary format (#513)
* remove binary format

* remove redundnt assert in TracerShimTests

* add null tracer and text format assertion

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-03 10:31:07 -08:00
Łukasz Pyrzyk f0a0b07ffb
Adjusted UseZipkin to new signature (#514)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-03-02 09:52:33 -08:00
Timothy Mothra 988984a7fa
fix typo in readme (#510)
I was asked to fix spelling errors when found. :)
2020-03-02 09:29:11 -08:00
Mikel Blanchard d5b4248261
JaegerExporter: Performance Improvements (#494)
* 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>
2020-02-26 14:49:39 -08:00
Mike Goldsmith 677c5ae558
Remove guage & add Observer metric instrument (#498)
* remove guage instrument

* add observer metric insrument

* update aggregator when observing value in ObserverHandle

* add observer test, enable measure and counter tests

* fix metric tests

* suffix instruments with Metric

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-02-26 14:18:25 -08:00
Mike Goldsmith f0633396bc
increase time tolerance in EventTests (#505) 2020-02-25 15:25:57 -08:00
Mike Goldsmith faafd05d3f
Add support for array attributes (#500)
* 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>
2020-02-21 10:41:29 -08:00
Vu Tran 7ecb080108
Keys with digits are still accepted (#499)
* 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>
2020-02-20 21:49:47 -08:00
Mikel Blanchard 4031bd2b87
JaegerExporter: Send a batch for each remote service (#486)
* 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>
2020-02-20 21:42:24 -08:00
Mikel Blanchard a7206200a5
Zipkin Exporter: Specify RemoteEndpoint (#483)
* 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>
2020-02-18 15:16:15 -08:00
Mike Goldsmith 3cba598345
Fix build warnings (#495)
* use correct type suffix instead of casting (SA1139) in spanTest

* fix comparison of strings in TracerFactoryTest
2020-02-17 12:12:24 -08:00
Mikel Blanchard 0c92b3e054
OpenTelemetry.Collector.Dependencies: HttpHandlerDiagnosticListener error description lost (#487)
* 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.
2020-02-17 11:22:03 -08:00
Mike Goldsmith 66c778fc77
Add converters for ActivitySpanId and ActivityTraceId (#490)
* add converters for ActivitySpanId and ActivityTraceId

* make converts internal

Co-authored-by: Austin Parker <austin@lightstep.com>
2020-02-12 15:43:30 -05:00
Mikel Blanchard 91d1ef25f7
JaegerExporter: Use LibraryResource or JaegerExporterOptions (#485)
* 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>
2020-02-12 11:20:09 -08:00
Liudmila Molkova e1d025a0eb
ApplicationInsights exporter: minor improvements for EventHubs and readme (#484)
* ApplicationInsights: minor improvements for EventHubs and readme

* a couple more fixes for EH
2020-02-10 08:07:04 -08:00
HarnidhK 2309be5b2d
Delete Exporters.csproj (#481)
Fix for https://github.com/open-telemetry/opentelemetry-dotnet/issues/480
2020-02-05 12:04:07 -08:00
HarnidhK 07d794012e
Classes scaffolding for zPages (#474)
* 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>
2020-02-04 22:11:40 -08:00
Peter Wiese 4d01c8c932
[JaegerExporter] Periodically flush undelivered Spans (#479)
* [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
2020-02-04 13:07:08 -08:00
Liudmila Molkova 184e63c4ab
Set operation name on the request, since UX is sensitive to it (#477) 2020-01-30 16:36:38 -05:00
SychevIgor 63d9bf145c
Asp.net core based sample of ApplicationInsights export (#433)
* Asp.net core based sample of ApplicationInsights export

* links to samples

* update links

* fixed solution

* fix merge issues

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-01-29 12:18:16 -08:00
Mike Goldsmith 66bb5199b1
Add more StackDriver labels (#471)
* update stackdriver user agent label to /http/user_agent

* More SD label replacements (component, http.route, http.url)

Co-authored-by: Nicolai Brogaard <nmb@minserver.dk>
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-01-29 11:44:29 -08:00
Liudmila Molkova 633dda37bd
Convert ISpan to abstract class and rename to TelemetrySpan (#464) 2020-01-27 15:28:55 -08:00
Nicolai Brogaard 1aee418730 Update github links for http specification (#473) 2020-01-27 13:34:26 -08:00
Mike Goldsmith d97217e445 add ConsoleExporter extension methods (#468)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-01-24 09:11:31 -08:00
Liudmila Molkova 56b12f9e31 Minor Fixes for Application Insights EventHub support (#469) 2020-01-23 23:20:24 -08:00
Liudmila Molkova 7424f156cc
Make SpanData tiny again (#465)
* Make SpanData tiny again: add internal SpanSdk ctor from exportable paramters

* add tests
2020-01-23 18:32:37 -08:00
Liudmila Molkova 85e589a6fc
Remove propagators from tracing API (#466) 2020-01-23 11:54:20 -08:00
Mike Goldsmith 9ddcc0adcc Refactor PrometheusExporter not hold internal HttpListener (#428)
* 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>
2020-01-22 22:22:26 -08:00
Peter Wiese e7c004f37a SpanId mismatched endianess in Jaeger UI (#459)
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>
2020-01-22 17:53:17 -08:00
Liudmila Molkova 1ba11917e8
Add helper to create service resource (#457)
* Add helper to create service resource

* add tests
2020-01-22 16:48:12 -08:00
Liudmila Molkova cc4665836f move ZPages to src and fix solution (#458) 2020-01-22 12:09:32 -08:00
Mike Goldsmith e605659411 add MyGet links for Console Exporter (#460) 2020-01-22 09:39:35 -08:00