Commit Graph

29 Commits

Author SHA1 Message Date
Cijo Thomas c470f0bb9c
TracerProvider renamings (#887)
* TracerProvider renamings

* rename

* Remove customization.md as its contents are part of SDK readme

* read only Default in TracerPRovier
2020-07-23 00:09:50 -07:00
Alan West ea107d3b69
Rename contants in SemanticConventions class to conform to recommended C# naming conventions (#892) 2020-07-22 23:55:17 -07:00
Cijo Thomas 4b4f0e95af
More refactorings, renamings, namespace shortenings. (#886)
* Rename OpenTelemetrySdk to TracerProviderSdk. Rename OpenTelemetryBuilder to TracerProviderBuilder

* renaming

* Shorter namespace for TracerProvider

* simpler namespace.

* revert unwanted change brought by git merge

* doc changes

* remove dup
2020-07-22 16:46:45 -07:00
Peter Wiese c1dedf0589
Don't throw when checking if an outbound HttpRequestMessage request is injected with the traceparent header (#869)
* If an outbound HttpRequestMessage does not include the traceparent header then don't throw.

Made the header values getters and setter static to avoid the Func and Action allocations per invocation.

* Missed a getter usage in HttpInListener

* Extending an existing unit test to validate the new HttpRequestMessage header value getter.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-21 17:13:33 -07:00
Mikel Blanchard b5a9c3a5d6
Cleaning up options in dependency instrumentation. (#846)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-20 10:20:39 -07:00
Mikel Blanchard c294cd7f76
Added options to HttpWebRequest instrumentation. (#741)
* Added options to HttpWebRequest instrumentation.

* Cleaned up some usings.

* Added IsInjected to ITextFormatActivity.

* Switched the Http instrumentation filter back to internal so we can move ahead with the other stuff while the API is reviewed.

* Updated HttpClient instrumentation to check IsInjected instead of traceparent header directly.

* FilterFunc is back to public. Removed ctors from http options.

* Removed ctor that isn't needed.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-19 18:51:14 -07:00
Reiley Yang f689163096
Add misspell to CI (#841) 2020-07-18 09:48:08 -07:00
Mikel Blanchard e13c33f596
Status cleanup (#838)
* Cleaned up status usage.

* Unit test fixup.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-18 07:56:38 -07:00
Mikel Blanchard b57f3cf320
.NET Core SqlClient Integration Tests + Fixes (#826)
* .NET Core SqlClient instrumentation integration tests, bug fixes, and cleanup.

* Dependency instrumentation docker artifacts and integration GitHub workflow.

* Code review feedback.

* Added docker-compose-wait to dockerfile so tests don't start until sql is listening.

* Code review.

* Namespaces for OTel ActivitySources.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-16 10:52:29 -07:00
Eddy Nakamura 5b34e3b3f8
Adding metapackages (#810)
Adding IsPackable to test.props, updating test nuget versions

updating projects, adding options parameter

Applying suggestions

Apply suggestions from code review

Co-authored-by: Paulo Janotti <pjanotti@splunk.com>

code review - cijo

removing aspnetcore "metapackage"

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-15 23:31:57 -07:00
Peter Wiese b319c0bed6
Replace references to SpanAttributeConstants with constants from SemanticConventions (#828)
* Replace references to SpanAttributeConstants with constants from SemanticConventions

* Missed a few references to the "component" attribute in some tests.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-15 17:27:21 -07:00
Mikel Blanchard 9298e0ef3f
Redis instrumentation with ActivitySource by Eddy & Mike (#800)
* Attempting to get Redis instrumentation up and working using ActivitySource API.

* updating tests

* renaming and updating tests

* Test fixes.

* Fixed Redis net461 tests failing on connection.

* Redis integration tests and bug fixes.

* Adding tests

* Put back redis connection options.

* Updates for changes in master.

* adding comments to testRedis

* updating based on comments

* updating summary

* Switched a couple spots using string keys to constants.

* Redis integration tests

* Small tweak to the GitHub action to make it more consistent with the others.

* Made instrumentation internal. Updated README.

* rename MaxFlushInterval to FlushInterval, adding flushInterval to samples

* Removed running of non-integration tests from Redis dockerfile.

Co-authored-by: Eddy Nakamura <eddynaka@gmail.com>
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-14 08:47:59 -07:00
Cijo Thomas 4abc57d02e
Fix and disable HttpWebRequest test (#797) 2020-07-10 08:55:41 -07:00
Eddy Nakamura 0973b3ea0a
Enable netcoreapp2.1 (#780)
updating yml

Revert "updating yml"

This reverts commit 391f3baadbca0de4b3e2d78b35db38eb7e7bddbc.

installing dotnet 2.1 and 3.1

updating yml to enable multiple dotnet versions

adding matrix condition

disable dotnet 2.1 for windows

removing unused package reference

Revert "removing unused package reference"

This reverts commit 0d898aa044f916743da613a83539f568bff3ad49.

updating yml

adding cov.yml to sln

Add resources to instrumentation (#779)

* Add resources to instrumentation

* Unit test activitysourcedapter

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

disabling ubuntu-latest to codecoverage

removing extra steps

adding codecov.yml

moving file

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-08 11:42:51 -07:00
Mikel Blanchard 049f72c0b4
Added Sql connection-level attributes (from spec) as an opt-in feature. (#782)
* Added Sql connection-level attributes (from spec) as an opt-in feature.

* Code review feedback.
2020-07-07 22:37:08 -07:00
Cijo Thomas 8f0cf0bd1a
Add resources to instrumentation (#779)
* Add resources to instrumentation

* Unit test activitysourcedapter

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-07-07 15:42:29 -07:00
Mikel Blanchard a48ff18b23
Added instrumentation for netfx SqlClient. (#761)
* Added instrumentation for netfx SqlClient.

* Code review.

* Send "db.statement_type" instead of "db.statementType".

* Added integration tests for SqlEventSource.

* Adding .github folder to solution.

* Added a couple missing files into the solution.

* Added FakeSqlEventSource tests.

* Fixed up GrpcClientDiagnosticListener for EventSource changes.

* Removed extra ActivityListener from unit tests.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-07 13:01:45 -07:00
Alan West 1b513721c9
Create GrpcTagHelper class (#771)
* Pull logic out of gRPC client instrumentation into helper class + add tests

* Fix parsing rpc.service with package that has multiple parts

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 23:15:35 -07:00
Eddy Nakamura 232e82eb02
github actions (#752)
moving folder

updating test to Tests.dll and folder to get less files

updating folder again

adding other versions to test

Adding linux and renaming

updating ubuntu version

updating yml linux

adding variables and using matrix

adding strategy to matrix

updating variables

new test

updating variables

updating variables

updating test packages

trying to add cache option

testing cache on windows

removing cache folder and trying to optmize files

updating

adding more workflows to test parallel

updating windows one job pipeline

updating

renaming

updating

updating test

adding verbose and breaking one test to double check

reverting test, adding new line, removing verbose from parallel

Update dotnet-core.yml

Update dotnet-core.yml

updating fetch depth

fetching all

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-01 13:04:22 -07:00
Cijo Thomas afd9135026
Add support for multiple pipelines in OpenTelemetryBuilder with Activity (#735)
* Add support for multiple pipelines in OpenTelemetryBuilder with Activity

* change Setpipeline toAddpipeline

* Dispose activityprocessor
2020-06-17 17:41:19 -07:00
Cijo Thomas a95b00a601
Instrumentation Adapter fixes for activity. (#730)
* expose ActivitySourceFake within OT which mimics ActivitySource for activities created using without ActivitySource.

* modify all instrumentation to use the ActivitySourceAdapter

* minor todo coment

* build fix

* Fix empty activitysource listening for asp.net
2020-06-16 14:55:11 -07:00
Eddy Nakamura ef11aa481d
Renaming .NET 461 files to .NETFramework (#731)
renaming file in copyright section

renaming to netfx
2020-06-16 10:28:54 -07:00
Eddy Nakamura 9f3bb81b4a
Enable .NET 452 - part 01 (#722)
* Enable .NET 452 - part 01

* removing warning and adding net452 to shims.OpenTracing

* adding net452 condition to dependencies code

* undoing non-related changes to pull request

* adding sytem.tuple to dependencies.test for net 452. changing condition to netframework

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-15 21:58:15 -07:00
Cijo Thomas 575ddd5fce
Add ActivityContextFormat and propagation (#724)
Add ITextFormatActivity and TraceContextFormatActivity
2020-06-15 17:37:04 -07:00
Cijo Thomas 2fe5100594
Adds HostingProject extension method to support new Activity based api. (#723)
* Adds HostingProject extension method to support new Activity based api.

* pr comment

* some test refactoring for better cleanup to ensure tests dnt interfere with each other
2020-06-12 10:10:26 -07:00
Cijo Thomas bb4480e421
Instrumentation Adapters to support Activity API (#701)
* use the same activity created by existing instrumentation. Simply enhance it.

* remove sampling from instrumentation

* add asp.net core instrumentation

* move sampling to Instrumentation for now.
Make Asp.Net instrumentation work with Activity API

* Add httpClient .net core instrumentation

* Ad SqlClientInstrumentation

* remove sqlclientinstrumentation from previous instrumentation

* Quick implementation for AzureClients - not validated as there are unit tests and this is not planned to be in this repo as well.

* fix examples

* fix sampling flag

* made sample app work with jaeger

* Mark todos and fix AspNet tests

* Fix asp.net core tests and mark TODOs

* Add TODO for httpclient .net core test and fix test

* add todo and fix httpclient test

* add todos and fil sqlclienttests

* Make OpenTelemetrySDK disposable and take care of disposing all ds subscriptions.

* Added OpenTelemetry.Default instead of static method

* AspNet, AspNetCore fix Dispose issue

* stylecop stuff lost i merge
2020-06-11 14:26:28 -07:00
Paulo Janotti 8ed37a6f59
Organize StyleCop Settings and enable StyleCop on Tests (#715)
* Enable StyleCop rules for Test projects

This enables most of the StyleCop for test projects cleaning up any
errors as appropriate.

* Enable StyleCop rules for Test projects

This enables most of the StyleCop for test projects cleaning up any
errors as appropriate.

* Add line break at end of ruleset files

* Correct multi-line parameter after rebase
2020-06-10 12:12:13 -07:00
Mikel Blanchard 96e1eb9f30
HttpWebRequest ActivitySource (#694)
* Updated HttpWebRequestDiagnosticSource to use the new .NET 5 ActivitySource API.

* Code review part 1 and string allocation reduction.

* Code review part 2 added ExceptionInitializingInstrumentation event.

* Code review feedback 3.

* Code review feedback 4.

* Updated unit tests and some code review feedback.

* Updated to JaegerActivityExporter since it was just merged.

* Refactored http tag value caching so that it can be shared in dependencies project.

* Code review.

* Noticed a couple comments needed to be updated.

* Added Activity.IsAllDataRequested logic.

* Code review.

* Reverted change to OpenTelemetrySdk.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-01 17:28:30 -07:00
Paulo Janotti 32f0151fae
Rename Adapter to Instrumentation per latest spec (#681)
Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
2020-05-19 21:55:24 +01:00