Commit Graph

682 Commits

Author SHA1 Message Date
Alan West 0f618d001d
Rename gRPC instrumentation project (#1136)
* Rename project OpenTelemetry.Instrumentation.GrpcNetClient

* Update GrpcNetClient README

* Update AspNetCore instrumentation README with gRPC support

* Update changelog and top-level readme

* markdownlint

* Fix project/file path references

* Change namespace to GrpcNetClient

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-21 21:35:19 -07:00
Cijo Thomas 6377d6bd87
Renamed extension methods from AddOpenTelemetry to AddOpenTelemetryTracerProvider (#1138)
* Renamed extension methods from AddOpenTelemetry to AddOpenTelemetryTracerProvider

* ununsed removal

* remove unnecessary test

* build fix
2020-08-21 21:28:10 -07:00
Reiley Yang 6676fc4eae
use Milliseconds (#1139) 2020-08-21 21:02:53 -07:00
Eddy Nakamura 3e1d7f1a20
Replacing variable names (#1134)
Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-08-21 19:01:47 -07:00
Reiley Yang 74232b824d
Refactor exporter - step 10 (#1135)
* make Shutdown/Flush sync

* calculate remaining time

* fix doc

* update changelog

* s/timeoutMillis/timeoutMilliseconds/g

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-08-21 18:51:09 -07:00
Cijo Thomas f5bffdb7fa
Rename Span to Activity in tests (part1) (#1133) 2020-08-21 15:46:14 -07:00
Cijo Thomas 7807c810cc
Instrumentation to store context object into Activity.CustomProperty (#1128)
* Modify instrumentations to populate context object only if Activity.IsAllDataRequested is set

* AspNetCore tests

* Asp.Net tests

* httpclient tet

* httpwebrequest test

* sqlclient tests

* grpc test

* changelog

* move inside alldatarequested

* remove test which validate customproperty population in propagation only mode

* cop caught

* fix test
2020-08-21 13:10:52 -07:00
Reiley Yang 683f8a1b61
Refactor exporter - step 9 (#1129)
* s/ExportResultSync/ExportResult/g

* s/ActivityExporterSync/ActivityExporter/g

* update changelog
2020-08-21 12:49:11 -07:00
Cijo Thomas 623187b6b5
Remove external dependency for tests (#1132) 2020-08-21 12:42:27 -07:00
Reiley Yang 9eccaf4818
Refactor exporter - step 8 (#1127)
* remove SimpleActivityProcessor

* update changelog

* remove ActivityExporter
2020-08-21 10:53:08 -07:00
Eddy Nakamura ee5b038540
Migrate JaegerExporter to BatchExportActivityProcessor (#1125)
* Updating Jaeger Exporter

* updating changelog
2020-08-21 08:32:53 -07:00
Eddy Nakamura c75d85ba6b
Updating Link/TelemetrySpan to accept SpanAttributes (#1120)
* Updating to use SpanAttributes

* updating link tests

* adding changelog and testing all supported types

* Update CHANGELOG.md

* updating changelog

* updating TelemetrySpan

* updating changelog

* updating to pass in tests

* changing to spanAttributes
2020-08-21 07:51:55 -07:00
Eddy Nakamura 7c46d45de7
Moving B3Format to API (#1123)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-21 07:28:37 -07:00
Eddy Nakamura 1b6c39d879
Implementation of RecordException in TelemetrySpan (#1116)
* Add RecordException method to TelemetrySpan

* reusing ToInvariantString already implemented

* updating changelog

* checking for null

* reusing method

* Adding activity extension to record exception

* adding aggressiveinlining

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-21 07:07:44 -07:00
Eddy Nakamura 83adf75f01
Migrate ZPagesExporter to BatchExportActivityProcessor (#1108)
* Changing Zpages processor

* updating changelog

* updating to ZPagesProcessor

* updating after merge

* adding internal reset method
2020-08-20 18:08:18 -07:00
Eddy Nakamura 595c3bd0c3
Fixing zipkin payload (#1112)
* Fixing zipkin payload

* adding more types to convert to string

* adding some comments

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-20 16:37:10 -07:00
Cijo Thomas cd435cdd4c
Consolidate Benchmarks projects (#1122)
* Consolidate Benchmarks projects

* solution fix

* f

* remove double readme
2020-08-20 16:17:25 -07:00
Eddy Nakamura 2c5f48f7a3
Adding tests (#1101)
* Adding tests

* Adding tests to Zpages

* updating tests

* checking purge

* merging tests to prevent parallel run issue

* checking if not empty

* adding collection to not run in parallel

* renaming

* checking nonevents in EventSource

* removing collections

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-20 16:01:34 -07:00
Reiley Yang 5fa2559dbf
remove BatchingActivityProcessor (#1113) 2020-08-20 14:50:58 -07:00
Cijo Thomas 08eb46841a
Contributing doc minor edits (#1111) 2020-08-20 11:25:24 -07:00
Cijo Thomas 7eb4250c00
Add basic benchmark for ActivitySourceAdapter (#1107) 2020-08-20 10:41:38 -07:00
Cijo Thomas 0e305b34c4
Minor rearrangement of tests (#1109)
* Minor rearrangement of tests

* Update ActivitySourceAdapterTest.cs
2020-08-20 10:31:23 -07:00
Eddy Nakamura a969c8f3cf
Migrate OtlpExporter to BatchExportActivityProcessor (#1104)
* Changing OtlpExporter

* updating changelog with last PR number

* solving null reference while converting activitylinks

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-08-20 09:45:34 -07:00
Eddy Nakamura 46907830e2
Updating VSTest nuget (#1074)
* Updating VSTest nuget

* updating to stable version

* updating nuget

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-08-20 09:26:51 -07:00
Reiley Yang b4ce36f5f6
Migrate ZipkinExporter to BatchExportActivityProcessor (#1103)
* migrate zipkin exporter to BatchExportActivityProcessor

* update changelog

* fix test failure

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-19 21:43:12 -07:00
Cijo Thomas d13ef78b06
ActivitySource minor optimization and test (#1105)
* ActivitySource minor optimization and test

* comment

* More optimize
2020-08-19 21:27:13 -07:00
Alan West 68c16da46f
SuppressInstrumentation from ActivityListener and DiagnosticSourceListener (#1079)
* Add SuppressInstrumentation check in the ActivityListener

* Add SuppressInstrumentation check in the DiagnosticSourceListner

* Fix things post merge

* Put AlwaysOn/AlwaysOff sampler check back in the constructor
2020-08-19 21:05:29 -07:00
Cijo Thomas 44b55d476e
Update ActivitySource processor whenever TracerProvider adds processor (#1102) 2020-08-19 14:27:33 -07:00
Cijo Thomas 4fcf20789a
Add RuntimeContext test part 2 (of many) (#1096)
* Add RuntimeContext test part 2 (of many)

* Throw when slot not found

* PR comments
2020-08-19 12:01:55 -07:00
Mikel Blanchard 8bd8641e3e
Instrumentation raw objects should be sent as custom properties (#1099)
* Added raw objects available to instrumentation as Activity custom properties.

* Updated CHANGELOGs.

* Added "OTel" prefix to custom properties. Moved to constants.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-18 21:28:51 -07:00
Eddy Nakamura 25d9a4befe
Checking for null value and type to add tag (#1097)
* Checking type before adding to tags

* Checking if value is null, adding more tests

* changing order to prevent useless conversion

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-18 21:19:14 -07:00
Mikel Blanchard 0d00b8df1c
Shared test cleanup. (#1100)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-18 21:11:15 -07:00
Reiley Yang bf694a0641
Refactor exporter - step 6 (#1094)
* implement BatchExportActivityProcessor

* fix typo

* wrap comments

* no need to stop a Stopwatch

* fix nit

* add thread name

* adopt zero-alloc enumerator

* avoid calling exporter with zero item

* better naming

* clean up

* fix the missing exportTrigger reset

* shutdown drain till sentry

* simplify the flow

* simplify the code

* periodic polling to avoid dead lock
2020-08-18 20:58:00 -07:00
Mikel Blanchard a30634cf0a
Allocation free batch exporting & CircularBuffer tweaks. (#1092)
* Added a union object to enable allocation free foreach of activity batches. Tweaked the CircularBuffer algorithm.

* Fixed file header.

* Switched ActivityBatch to Batch<T>.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-18 15:57:30 -07:00
Mikel Blanchard dcaea5bd45
Baggage + CorrelationContext improvements by Eddy & Mike (#1048)
* Support W3C Baggage spec.

* Moved baggage propagation to its own ITextFormat. Removed IsInjected.

* updating some tests

* creating nw files

* updating files

* buildable in release

* adding baggage tests

* updating tests

* updating default textformat for http instrumentation

* Removed a few null checks.

* Removed DistributedContext. Drive CorrelationContext off of Activity.Baggage.

* updating issues after merge

* updating based on sanity check

* updating baggage test

* updating tests

* reiley's comments

* move to using

* Updates for http-in and http-out. Updated CHANGELOGs.

* Adding tests.

* updating correlation context

* Added test for TraceContextFormat + BaggageFormat used together.

* Fixed broken tests.

* Code review.

* Test fixup.

* updating order

* updating tests

* updating tests, adding dispose, clearing objects

* updating changelog

* Use "Baggage" instead of "baggage" as the header name.

* Added some basic support for the Baggage limits specified in the spec.

* Fixed and improved ITextFormat log messages.

* Rename TextFormatContext -> PropagationContext.

* Updated ITextFormat implementations so they don't double-extract.

Co-authored-by: Eddy Nakamura <ednakamu@microsoft.com>
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-18 15:39:59 -07:00
Cijo Thomas 61d9cc2fcc
Add RuntimeContext test placeholder, other minor test refactor (#1093) 2020-08-18 00:39:41 -07:00
Paulo Janotti 13672a7c84
Add otelcol docker to otlp example (#1073)
* Add OTel Collector docker to OTLP example

Adding a configuration and instructions on how to run the OpenTelemetry Collector to receive the spans generated using the OTLP exporter.

* Correct example instructions

* Separate Unix and Windows instructions

* Move collector config file to its own folder

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-17 11:52:58 -07:00
Reiley Yang 4a70a53782
s/count/maxCount/g and add xml comments (#1089)
* s/count/maxCount/g; add xml comments

* remove repetitive wording

* wrapping

* fix nits
2020-08-16 22:38:21 -07:00
Reiley Yang 0d7ef909da
Add max spin count limit to circular buffer (#1088)
* add max spin count limit

* fix typo
2020-08-16 18:27:33 -07:00
Reiley Yang ec5683adbc
Refactor exporter - step 5 (#1087)
* add a circular buffer

* add memory barrier

* ++

* clean up

* integrate the circular buffer into BatchExportActivityProcessor

* integrate the circular buffer into BatchExportActivityProcessor

* better naming

* better naming
2020-08-16 09:48:16 -07:00
Reiley Yang 90c370f021
Refactor exporter - step 4 (#1085)
* add a circular buffer

* add memory barrier

* ++

* clean up

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-08-15 22:13:40 -07:00
Reiley Yang 4895c59b1f
s/lck/syncObject/g (#1084) 2020-08-15 09:01:42 -07:00
Reiley Yang 20bf5c924e
Refactor exporter - step 3 (#1083)
* switch console exporter to SimpleExportActivityProcessor

* use synchronization in SimpleExportActivityProcessor
2020-08-14 21:31:54 -07:00
Reiley Yang a4237cf104
Refactor exporter - step 2 (#1081)
* skeleton of export processors

* remove unused using statements

* add blank line
2020-08-14 15:52:15 -07:00
Eddy Nakamura 6fb3c37bf9
Enable FxCop - part 04 (#1076)
* FxCop - Part 04

* more updates

* adding readonly

* updating more files

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-13 21:28:08 -07:00
Reiley Yang e52d76e3d8
Refactor exporter - step 1 (#1078)
* refactor exporter

* stay closer to the spec

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-13 20:55:31 -07:00
Alan West 0802d1e67a
Make suppress instrumentation APIs less prone to introducing bugs (#1067)
* Make suppress instrumentation APIs less prone to introducing bugs

* Update changelog

* Change return type to IDisposable

* Make SuppressInstrumentationScope.Begin public

* Remove Sdk.BeginSuppressInstrumentationScope

* Fix exporter example

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-13 19:28:18 -07:00
Cijo Thomas 06ebd1f465
Add tests for TracerProviderSdk (#1077)
* Add tests for TracerProviderSdk

* fix

* comment
2020-08-13 13:01:07 -07:00
Reiley Yang 812fe936cf
Remove null sampler logic (#1072)
* remove null sampler logic

* fix ordering issue
2020-08-13 10:10:38 -07:00
Eddy Nakamura 499933ea81
Enable FxCop - part 03 (#1016)
removing tag

code review - 1

undoing to Count == 0

updating files

adding IEquatable

Adding tests

updating version and adding tests

updating net test version

rollback version update

adding more tests

removing extra line

updating files

Adding more tests

reverting change based on benchmark

updating gethashcode

updating files

sampling results tests

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-13 09:39:16 -07:00