Commit Graph

385 Commits

Author SHA1 Message Date
Mikel Blanchard 94c412ef35
Switched back to a local fork of ApacheThrift in JaegerExporter. (#627)
* Switched back to a local fork of Thrift to fix issues introduced consuming the official package.

* Code review.
2020-04-23 00:43:55 -07:00
Cijo Thomas 8983b41255
Remove non-working example from readme (#621)
* Remove non-working example from readme

* revert unintended changes

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-22 18:07:59 -07:00
Cijo Thomas 8a22eaf81e
Rename CanonicalCode to StatusCanonicalCode (#618)
* Add new ctor to Status, Rename CanonicalCode to StatusCanonicalCode. Both changes make code match the spec.

* revert Status public ctor. There already exists a more efficient  way to create Status without ctor.

* minor

* PropertyName in Status to be simply CanonicalCode ionstead of StatusCanonicalCode, as the name of class itself is Status already and hence no need to repeat in property name

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-22 17:14:14 -07:00
Cijo Thomas 9a1fa32b83
Fix InvalidSpan.End throwing nullref exception (#622)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-22 16:58:57 -07:00
Cijo Thomas 60e3f7b725
Add doc comments for Samplers. (#617)
* Add doc comments for Samplers.

* Fix escaping braces in Sampling Desc
2020-04-22 16:49:15 -07:00
Long Mai 4f352ff73c
refactor!: collector to adapter (#612)
* refactor: collector to adapter project file and dir

* refactor: collector to adapter namespaces

* refactor!: collector to adapter variable rename

BREAKING CHANGE

* docs: rename collector to adapter

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-22 14:44:55 -07:00
Cijo Thomas e582287197
Rename TraceOptions to TraceFlags to match spec. (#616)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-20 20:52:27 -07:00
Eddy Nakamura 31c7c65a45
Removing ruleset from projects (#615)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-20 17:22:43 -07:00
Cijo Thomas 838d25f78b
Add working prometheus example to samples (#610)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-20 16:55:15 -07:00
Cijo Thomas 961e6a2fdf
Add exporting Summary metric to Prometheus (#608)
* Add PushMetricController

* unit test

* Add MeterBuilder and MeterFactory

* adjust tests

* correct prometheus example

* Minors

* small

* Prometheus test

* Fix Prom Middleware test

* few small fixes

* Address comments

* avoid meter to metersdk cast

* one test

* comment

* test fx

* timing adjustment

* minor

* Add Summary exporting to Prometheus

* fix Eventname

* avoid unnecessary copy of metric list

* fix trailing spaces etc after merge

* add test

* Tests for Summary export

* summary double

* fix output

* address PR comment

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-20 16:31:03 -07:00
Eddy Nakamura df264b5852
Adding test.ruleset to test projects (#611)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-20 15:41:30 -07:00
Cijo Thomas bc5fd95350
Modify CI to remove publish test tsk as its done automatically. (#614)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-20 15:18:28 -07:00
Cijo Thomas e554526428
PushController test stabilizing (#613) 2020-04-20 15:04:11 -07:00
Eddy Nakamura 9e13a090e7
Updating remaining projects to prod.ruleset (#603)
* Updating remaining project to prod.ruleset

* updating benchmarks and samples to use loose ruleset

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-17 13:10:04 -07:00
Cijo Thomas 2e7e93cc01
Metric Push Controller and basic config (#599)
* Add PushMetricController

* unit test

* Add MeterBuilder and MeterFactory

* adjust tests

* correct prometheus example

* Minors

* small

* Prometheus test

* Fix Prom Middleware test

* few small fixes

* Address comments

* avoid meter to metersdk cast

* one test

* comment

* test fx

* timing adjustment

* minor

* fix Eventname

* avoid unnecessary copy of metric list

* fix trailing spaces etc after merge

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
2020-04-16 16:08:05 -07:00
Sergey Kanzhelev 1fea4037d5
Improve test reliability (#602)
See https://dev.azure.com/opentelemetry/pipelines/_build/results?buildId=1538&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=fa4a47f7-906d-5276-1b56-2e609eec1e77

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
2020-04-16 22:05:06 +01:00
Eddy Nakamura 0641115db1
Adding ruleset to OpenTelemetryCollector Test Project (#604) 2020-04-16 21:55:25 +01:00
Eddy Nakamura a7bf7f2168
Updating ruleset to OpenTelemetry.csproj (#601)
* Updating ruleset to OpenTelemetry.csproj

* updating return comments

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-15 16:13:02 -07:00
Eddy Nakamura 38850878b5
Build warnings for Assert.NotNull on KeyValuePair in TracerTests (#594)
* Changing implementation from NotNull to Equals based on the value

* Update test/OpenTelemetry.Tests/Impl/Trace/TracerTest.cs

Co-Authored-By: Bruno Garcia <bruno@brunogarcia.com>

* Apply suggestions from code review

Co-Authored-By: Mike Goldsmith <goldsmith.mike@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Mike Goldsmith <goldsmith.mike@gmail.com>

Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-15 15:58:54 -07:00
Eddy Nakamura fbcd1a0244
Adding files with blank space (#600) 2020-04-15 13:11:28 -07:00
Alexey Zimarev 48dbba3304
Removing more generics for #392 (#560)
* Removing more generics for #392

* Fixing the formatting issue

* Removed Unsafe everywhere

* Fixing method order and file name in the header

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-15 12:46:17 -07:00
Mike Goldsmith bc684ff951
Context propagation - OTEP-66 (#462)
* consolidate all files under DistributeContext to Context in API and SDK

* rename DistributedContext classes to CorrelationContext et al

* update missed test renaming

* re-add DistributedContext and refactor carrier to use it

* add IEquatable to DistributedContext

* 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.

* Fix build (#548)

* fix build

* rename queue to pool

* do not pack tests

* try to switch to VSBuild

* rename CorrelationContextScopeTest to DistributedContextScopeTest

* remove UpdateThreadArguments class from LastValueAggregatorTest (#552)

* Added support for .NET Framework HttpClient & HttpWebRequest dependency collection. (#553)

* Added support for .NET Framework HttpClient & HttpWebRequest dependency collection.

* Code review feedback.

* Updated HttpHandlerDiagnosticListener with latest changes from dotnet/runtime. Added try/finally for span.End calls. Fixed missing span.End in Sql exception event.

* Fixed broken SqlClientTests.

* A few tweaks to README for recent collector changes.

* Tested Azure SDK exception path and updated the TODO comment.

* Wrapping up enumerables for #407 and some cleanup (#558)

* Wrapping up enumerables for #407 and some cleanup

* Fixing whitespaces

* One more

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

* fixes #559 (#563)

* Fixed the solution not building from dotnet build CLI. (#554)

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

* Adding method to EvictingQueue, updating SpanSdk to update if key exists (#557)

* Adding method to EvictingQueue, updating SpanSdk to update if key exists

* Adding Replacing test to EvictingQueue; Updating SpanTest; Renaming from Update to Replace

* Adding wrapper to AddOrUpdateAttribute, adding validation to index in Replace method

* Adding NoReplacing Test when element doesn't exist

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

* Attempting to fix the myget build pipeline so the packages come out valid on the other end. (#565)

I don't have a way to start a build from fork. So let's test right in master...

* updating README.md samples (#556)

* updating README.md samples

* adding missing variables to example

* updating samples in readme

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>

* Implemented short-live bound instruments. (#547)

* Initial draft for implementing record cleanup. Implemented for longCounters only. One basic test as well.

* small fixes

* Test for double counter

* Double test counter

* Use instrument level lock

* Added comment.

* Tests fix

* minor

* Added new intermediate status NoPendingUpdate for instrument record. This greatly reduced the need to take locks

* comment

* Fixed CurrentBatches dictionary being modified while a flush is running. (#571)

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

* Fixed up Jaeger project so that correct Thrift.dll is included in the nupkg & ApacheThrift is listed as a dependency. (#566)

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

* ASP.NET dependency collector fixes and cleanup. (#570)

* Updated with latest bug fixes. Refactored to fit into OT solution.

* Ported bug fixes and unit tests.

* Code review.

* Unit test improvement.

* Code review.

* Fixed crashing TestServer on close.

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>

* add LS access token header to http request (#587)

* Clone Activity tags to Span Attributes (#572)

Resolves #430

* Initial work for validation

* Changed activity tags creation

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>

* consolidate all files under DistributeContext to Context in API and SDK

* rename DistributedContext classes to CorrelationContext et al

* update missed test renaming

* re-add DistributedContext and refactor carrier to use it

* Fix build (#548)

* fix build

* rename queue to pool

* do not pack tests

* try to switch to VSBuild

* replace CorrelationContext with DistributedContext in BinarySerializer

* revert whitespace fixes to simplify review

* Update src/OpenTelemetry.Api/Context/CorrelationContext.cs

Co-Authored-By: Bruno Garcia <bruno@brunogarcia.com>

* Update src/OpenTelemetry.Api/Context/DistributedContextBuilder.cs

Co-Authored-By: Bruno Garcia <bruno@brunogarcia.com>

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
Co-authored-by: Alexey Zimarev <alex@zimarev.com>
Co-authored-by: Eddy Nakamura <eddynaka@gmail.com>
Co-authored-by: Eddy Nakamura <ednakamu@microsoft.com>
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Co-authored-by: Bruno Santos <brunomiguelas@gmail.com>
Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
2020-04-14 14:21:58 -07:00
Mikel Blanchard b35311e75d
ZipkinExporter performance improvements. (#596)
* ZipkinExporter performance improvements.

* Bug fixes.

* Added a Zipkin integration test.

* Bug fixes.

* Fixed HttpClientCollectorOptions not filtering HttpWebRequest events.

* Removed LangVersion from project file, it wasn't needed.

* Fixed unit tests failing when IPv6 isn't available on host.

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-14 14:09:18 -07:00
Cijo Thomas a1ce4ebec9
Fix EventSource by replacing ReadOnlySpan with string as EventSource is not able to serialize ReadOnlySpan (#598)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-14 13:59:53 -07:00
Mikel Blanchard a0360d65f4
JaegerExporter cleanup. (#595)
* JaegerExporter cleanup.

* Fixed ToJaegerSpan returning peerServiceName for server spans. Fixes #589.
2020-04-14 13:48:15 -07:00
Eddy Nakamura 416e4af8e6
moving SamplingResult to SDK (#591) 2020-04-10 17:14:12 -07:00
Bruno Santos 85688d0adb
Clone Activity tags to Span Attributes (#572)
Resolves #430

* Initial work for validation

* Changed activity tags creation

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
2020-04-09 12:18:42 +01:00
Mike Goldsmith 006357696a
add LS access token header to http request (#587) 2020-04-08 12:28:05 -07:00
Mikel Blanchard 2b56eaccd0
ASP.NET dependency collector fixes and cleanup. (#570)
* Updated with latest bug fixes. Refactored to fit into OT solution.

* Ported bug fixes and unit tests.

* Code review.

* Unit test improvement.

* Code review.

* Fixed crashing TestServer on close.

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-07 14:11:50 -07:00
Mikel Blanchard 25364378c5
Fixed up Jaeger project so that correct Thrift.dll is included in the nupkg & ApacheThrift is listed as a dependency. (#566)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-06 16:13:23 -07:00
Mikel Blanchard 577821a379
Fixed CurrentBatches dictionary being modified while a flush is running. (#571)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-06 14:53:12 -07:00
Cijo Thomas 26e78945af
Implemented short-live bound instruments. (#547)
* Initial draft for implementing record cleanup. Implemented for longCounters only. One basic test as well.

* small fixes

* Test for double counter

* Double test counter

* Use instrument level lock

* Added comment.

* Tests fix

* minor

* Added new intermediate status NoPendingUpdate for instrument record. This greatly reduced the need to take locks

* comment
2020-04-06 12:17:29 -07:00
Eddy Nakamura 13d2acda4c
updating README.md samples (#556)
* updating README.md samples

* adding missing variables to example

* updating samples in readme

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
2020-04-03 15:47:15 +01:00
Mikel Blanchard 3f43c5aaf1
Attempting to fix the myget build pipeline so the packages come out valid on the other end. (#565)
I don't have a way to start a build from fork. So let's test right in master...
2020-04-01 23:53:24 -07:00
Eddy Nakamura 79828a209e
Adding method to EvictingQueue, updating SpanSdk to update if key exists (#557)
* Adding method to EvictingQueue, updating SpanSdk to update if key exists

* Adding Replacing test to EvictingQueue; Updating SpanTest; Renaming from Update to Replace

* Adding wrapper to AddOrUpdateAttribute, adding validation to index in Replace method

* Adding NoReplacing Test when element doesn't exist

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-01 13:43:29 -07:00
Mikel Blanchard a6d5c511dc
Fixed the solution not building from dotnet build CLI. (#554)
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-01 12:19:01 -07:00
Sergey Kanzhelev 542f7a3e29
fixes #559 (#563) 2020-04-01 12:10:11 -07:00
Alexey Zimarev 77b56f8847
Wrapping up enumerables for #407 and some cleanup (#558)
* Wrapping up enumerables for #407 and some cleanup

* Fixing whitespaces

* One more

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-01 10:30:54 -07:00
Mikel Blanchard 5fa22a3bc2
Added support for .NET Framework HttpClient & HttpWebRequest dependency collection. (#553)
* Added support for .NET Framework HttpClient & HttpWebRequest dependency collection.

* Code review feedback.

* Updated HttpHandlerDiagnosticListener with latest changes from dotnet/runtime. Added try/finally for span.End calls. Fixed missing span.End in Sql exception event.

* Fixed broken SqlClientTests.

* A few tweaks to README for recent collector changes.

* Tested Azure SDK exception path and updated the TODO comment.
2020-04-01 00:40:27 -07:00
Mike Goldsmith 5f12087e07
remove UpdateThreadArguments class from LastValueAggregatorTest (#552) 2020-03-25 13:03:03 -07:00
Sergey Kanzhelev 5998250c0f
Fix build (#548)
* fix build

* rename queue to pool

* do not pack tests

* try to switch to VSBuild
2020-03-24 15:40:37 -07:00
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