Commit Graph

682 Commits

Author SHA1 Message Date
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
Cijo Thomas c5e5604115
Remove span exporter from ConsoleExporter (#783)
* Remove SpanExporter from ConsoleExporter. Only Activity exporter needs to remain.

* rename console activity exporter to just console exporter

* change example dotnet run

* minor
2020-07-08 11:23:59 -07:00
Cijo Thomas a36236f74e
AspNetCore instrumentation fix for null tag (#786)
* AspNetCore instrumentation fix for null tag

* fix
2020-07-08 10:46:02 -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
Cijo Thomas cdf0cbe397
Modify readme to show CI status badge. (#775)
* Modify readme to show CI status badge.

* refac

* layout ix

* remoe extra line

* spacing
2020-07-07 12:52:36 -07:00
Cijo Thomas ca322b3883
Remove a azure file left off somehow from earlier cleanup (#776) 2020-07-07 06:48:02 -07:00
Eddy Nakamura 938343c85f
Enable codecov for windows (#777)
cleaning props/targets

updating to new version of codecov

adding env_vars

updating yml

adding env_vars

solving compilation issue

adding source root

adding source root

fixing wrong tag

commenting sourceroot

enabling deterministic for packs only

changing job titles

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-07 06:29:45 -07:00
Cijo Thomas b68670322a
Add GH Action trigger for master branch merge. (#774)
* Add GH Action trigger for master branch merge.

* master for code coverage
2020-07-07 06:12:28 -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 d476b5f8fe
Adding Code Coverage (#770)
removing coverlet.msbuild

testing cov

temp moving

removing linux from cov

adding steps

commenting report part

updating dotnet tool command

changing to no-restore

adding configuration release

enabling disableappdomain

updating order

fail-fast false

updating path

updating path

undoing

changing to linux (faster)

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 22:53:23 -07:00
Cijo Thomas 8e499cd6b2
Remove Azure devops pipeline as GH actions is enabled now. (#772)
* Remove Azure devops pipeline as GH actions is enabled now.

* remove ci file from vs solution
2020-07-06 22:40:19 -07:00
Eddy Nakamura f95f3730fb
updating minver version (#768)
adding target after minver

adding correct revision number

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 21:59:10 -07:00
Rajkumar Rangaraj 5ebc27f94d
Modified JaegerActivityExporter/OpenTelemetryProtocolActivityExporter to accept custom processor (#763)
* Create rajrang123

* Modified overload methods for Console, Jaeger and OTLP exporter to accept custom processor.

* Fixed line break

* Swapped processorConfigure/SetExporter

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 18:19:50 -07:00
Rajkumar Rangaraj 9a751589fd
Batching activity processor (#755)
* Added BatchingActivityProcessor

* Fixed test case.

* Refactored tests

* Matched OT spec by adding exporterTimeoutMillis

* Incorporated Reiley's feedback

* Update TestActivityExporter.cs

* Fix test

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 17:02:46 -07:00
Alan West 401737eada
gRPC client instrumentation (#687)
* Wire up Grpc.Net.Client instrumentation

* Fix missed namespace change

* Fix typos

* Make regex private static

* diagnosticSourceSubscriber cannot be null

* Use grpc.method tag from activity for span name and service attribute

* gRPC instrumentation set Span.Status

* Revert "gRPC instrumentation set Span.Status"

This reverts commit be89687865.

* Set span.Status from grpc.status_code tag on activity

* Remove code and comments regarding context propagation

* Remove OnException override. GrpcClient does not have an OnException event.

* Update GrpcClient instrumentation to use ActivitySource

* Add simple test of GrpcClient instrumentation

* Remove usused method

* Remove Grpc.Core reference and use version 2.25.0 of other Grpc dependencies

* Throw if activitySource is null

* Retrieve Activity.Kind PropertyInfo once

* Add grpc.system attribute

* Update rpc.service attribute per change to RPC spec

* Make ActivityKindPropertyInfo static

* Change default URI to localhost

* Add rpc.method attribute to span

* Add rpc.service and rpc.methods attributes only on successful match

* Add constants for the tags sourced from the Grpc.Net.Client library

* Simplify test scaffolding for Grpc tests

* Add test showing spans collected from Grpc instrumentation and underlying HttpClient instrumentation

* Include package in rpc.service attribute

* Make GrpcClientInstrumentation internal

* Validate that the HTTP span is a child of the gRPC span

* Set Activity.DefaultIdFormat in constructor

* After making call to gRPC stop the test host

* Revert "After making call to gRPC stop the test host"

This reverts commit e7a7cbb8ed.

* Upgrading gRPC dependencies to 2.30.0-pre1 to resolve test flicker

* Use Grpc.Tools 2.25.0

* Replace Grpc.AspNetCore reference with Grpc.AspNetCore.Server

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 16:07:14 -07:00
Alan West 47120b4199
Make HttpClientInstrumentation and SqlClientInstrumentation internal (#766)
* Make HttpClientInstrumentation and SqlClientInstrumentation internal

* Make AspNet and AspNetCore instrumentation internal

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 12:42:45 -07:00
Peter Wiese c7253f5979
Update to the latest stable OTLP proto files (#758)
* Update to the latest stable OTLP proto files

From 1a931b4b57

The current proto files are incompatible with the latest opentelemetry-collector and opentelemetry-collector-contrib

* Update the README file

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-06 12:21:20 -07:00
Alan West 4f6046f2bb
Check if TraceState is null (#765)
* Check if TraceState is null

* Test TraceContextFormatActivity.Inject with no tracestate

* Add test of Inject with tracestate
2020-07-04 20:04:07 -07:00
Rajkumar Rangaraj 13b1a5d2fc
Add a ConsoleActivityExporter/ZipkinActivityExporter extension method with samples (#759)
* Create testrajrang

* Added overload methods to Console and Zipkin exporter

* Refactored and change variable names

* Incorporating PR feedback

* Incorporating Mikel's feedback
2020-07-02 10:50:48 -07:00
Cijo Thomas 504713f759
Add Resource to OpenTelemetryBuilder for Activity (#739)
* Add Resource to OpenTelemetryBuilder for Activity

* ActivitySourceAdapter to pass parentcontext to sampling.

* More tests

* more tests

* refactoring a bit
2020-07-01 17:02:45 -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 5404ca0354
Add custom processor example and consoleexporter extension method. (#754) 2020-06-30 07:03:55 -07:00
Peter Wiese 0aa8bfef96
OTLP Span attributes fixes (#749)
- Coerce Activity tags into the correct OTLP attribute types
- Ensure that the attribute type is properly specified

At the very least, we need to set the attribute type, but I also think it is
important to use the attribute types accurately.

Verified against the latest versions of the collector.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-29 11:15:48 -07:00
Alexey Yakovlev 2953cd1025
Added .NET 4.6 target to the Jaeger exporter (#748)
* Added .NET 4.6 target.

* Added net46 target.

* Update test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj

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

Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
2020-06-27 07:21:27 -07:00
Austin Parker c5dafd48fa
Add gRPC headers to OTLP requests (#740)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-26 09:37:05 -07:00
Cijo Thomas f8a1c24606
ActivitySourceAdapter sampling parameter fix (#747)
* ActivitySourceAdapter to pass parentcontext to sampling.

* More tests

* more tests

* test correctness
2020-06-23 15:53:30 -07:00
Rajkumar Rangaraj e5d6865406
Modified sample to include Zipkin activity exporter + Fixed time precision for annotation (#743)
* Updated Console Sample for Zipkin exporter to incude activity exporter + fixed a bug in Annotation timestamp.

* Refactored

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-22 23:07:53 -07:00
Eddy Nakamura d99d5859fe
Enable net452 to Exporter.Zipkin (#744)
* Enable net452 to Exporter.Zipkin

* adding net461 to zipkin

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-22 14:42:29 -07:00
Eddy Nakamura 8f182b066d
Enable net452 to OpenTelemetry.Api (#742)
* Enable net452 to OpenTelemetry.Api

* changing to netframework tag

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-22 09:54:18 -07:00
Rajkumar Rangaraj bbf68f6d31
Add ActivityExporter for Zipkin (#738)
* Adding Zipkin activity exporter

* Added activitysource to tags

* Revert ZipkinTraceExporterOptions name change

* Refactored ProcessTags

* Removing sample files

* Modified UseZipkinActivityExporter to use AddProcessorPipeline

* Refactored based on Reiley's comments

* Added UseShortTraceIds to test

* Added useShortTraceIds to test

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-19 16:41:16 -07:00
Eddy Nakamura ce09b59405
Enable .net 452 - part 02 (#732)
* Enable .net 452 - part 02

* moving DateTimeOffsetExtensions to OpenTelemetry.Internal, adding tests to projects

* revoving useless reference to netframework for prometheus.tests

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-19 13:05:03 -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 10f870ebe5
Remove vendor specific instrumention from main repo. (#737) 2020-06-17 14:09:59 -07:00
Reiley Yang ea70fece4f
update codeowners file (#734)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-17 00:39:52 -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
Cijo Thomas 50638a9c31
Remove Logging Tracer and examples using the same. (#733) 2020-06-16 14:25:39 -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
Cijo Thomas 210d886191
Add activitycreation from parent scenario to Benchmark (#726) 2020-06-15 22:11:09 -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 fa69fb0a2b
Add basic benchmark project for Activity based SDK. (#725)
* Add basic benchmark project for Activity based SDK.

* readme separate
2020-06-12 15:16:58 -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
Eddy Nakamura e6ef05cd13
Enable NET452 for OpenTelemetry.Tests (#720) 2020-06-12 07:48:43 -07:00
Paulo Janotti 5da574c109
Preserve the TraceId of root Activity (#719)
* Preserve the TraceId of root Activity

When creating the root Activity the sampler should return PropagateData to ensure that the traceID of the root is preserved even if not recorded (sampled per OpenTelemetry parlance).

* Refactor to encapsulate all OTel sampling code

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-06-11 14:40:11 -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
Cijo Thomas c7333e49fe
Update to newer build of diagnosticsouce (#718) 2020-06-09 12:23:59 -07:00
Reiley Yang f256db8bc8
Make the SDK compile on .NET Framework 4.5.2 (#717)
* make the SDK compile on .NET Framework 4.5.2

* add comments
2020-06-09 11:55:12 -07:00