Commit Graph

38 Commits

Author SHA1 Message Date
Timothy Mothra 64f1d74561
fix analysis issues: CA2007 (part2) (#4018)
* fix analysis issues: CA2007

* remove duplicate

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2022-12-15 16:31:49 -08:00
Vishwesh Bankwar 732f199676
Update grpc client enrich callbacks (#3804) 2022-10-24 12:41:54 -04:00
Vishwesh Bankwar 0c31fb9702
[ASP.NET Core] Update enrich callbacks to use specific type. (#3749) 2022-10-21 13:26:41 -04:00
Mikel Blanchard 960908cb69
[Traces] Support named options in gRPC instrumentation (#3665)
* Support named options in grpc instrumentation.

* CHANGELOG update.
2022-09-14 17:40:53 -07:00
Vishwesh Bankwar 7fd9cb34ab
Remove netstandard targets from asp.netcore instrumentation (#3567) 2022-08-17 17:26:35 -07:00
Vishwesh Bankwar 135fa9c7e9
netcoreapp3_1 code cleanup (#3551) 2022-08-05 09:04:20 -07:00
Alan West 95500ff8fa
Add netstandard2.0 target to Grpc.Net.Client instrumentation (#3105) 2022-05-06 10:34:29 -07:00
Travis Illig d55de344f1
Fix IDE0090: 'using' statement can be simplified. (#3017) 2022-03-10 21:32:41 -08:00
Travis Illig 7b19794de3
Fix IDE0001: Name can be simplified. (#3011) 2022-03-10 07:39:27 -08:00
Austin Tan c17d794fd4
Unit Tests for Enrich calls in Instrumentation Libraries (#2133) 2021-07-19 09:45:23 -07:00
Utkarsh Umesan Pillai 41a0a26649
Add unit test for SdkSuppressInstrumentation (#1911) 2021-03-15 20:17:39 -07:00
Utkarsh Umesan Pillai 41a3371e2a
Optimize gRPC client instrumentation for suppress instrumentation (#1904)
* Optimize gRPC client instrumentation for SuppressInstrumentation

* Udated unit tests
2021-03-13 10:23:13 -08:00
Cijo Thomas de7d06fb96
Adding a small improvement to unit test for grpc (#1885) 2021-03-09 10:57:01 -08:00
Utkarsh Umesan Pillai 1fb76952cd
Updated the number of invocations to wait for; Added Assert for each of the processor invocations (#1641) 2020-12-02 11:34:42 -08:00
Alan West d958505b9c
Conform gRPC span name to spec (#1551)
* Conform gRPC span name to spec

* Update changelog

* Use TrimStart
2020-11-16 11:42:32 -08:00
Reiley Yang 6cc8e44d4d
remove unused using statements (#1534) 2020-11-13 06:33:02 -08:00
Eddy Nakamura 7063ea055a
Updating grpc status code (#1488)
* Updating grpc status code

* validating rpc.grpc.status_code tag

* updating assert

* updating method

* updating tests

* renaming to tryGet, returning false if not valid

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-11-09 21:14:17 -08:00
Alan West 30f6b70f3e
Wait for processor invocations (#1497)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-11-09 17:32:37 -08:00
Mikel Blanchard b956a5f7e9
Resource allocation improvement (#1463)
* Introduces the concept of IProviderContainer which allows injection of a TracerProvider into lower levels (Processor, Exporter, etc.).

* Removed IProviderContainer and fixed the provider types.

* Removed log provider example.

* Working on getting everything working with the new API.

* Attempting to get all the tests passing.

* Added concept of BaseProvider. Updated public API.

* Project fixup.

* Removed OnParentProviderSet.

* Updated changelog.

* Test fixup.

* Test fixup.

* Cleanup.
2020-11-09 13:39:25 -08:00
Eddy Nakamura 052ecc44b2
Enable .net5.0 (#1486)
* Enable .net5.0

* fixing build issues

* updating sanity

* fixing windows pipelines

* adding aspnetcore5.0

* adding net5 workaround

* skipping Flackytest

* updating to latest stable version

* updating code coverage to latest preview
2020-11-09 12:34:03 -08:00
Alan West 6939dd5b4f
Grpc.Net.Client context propagation (#1464)
* Move HttpRequestMessage context getter/setter methods to static class

* Share HttpRequestMessageContextPropagation with Grpc.Net.Client instrumentation

* Propagate context from Grpc.Net.Client instrumentation when suppressing downstream instrumentation

* Use Baggage.Current

* Document instrumentaiton options

* Add code example

* AddHttpClientInstrumentation

* Remove ASP.NET section

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-11-05 20:37:43 -08:00
Alan West 67f1e9f80b
Refactor gRPC tests (#1417) 2020-10-28 16:48:36 -07:00
xiang17 a2b1e363f0
Remove all unused using statements in the solution (#1354) 2020-10-15 17:43:29 -07:00
Eddy Nakamura 378ba54b77
Updating Status based on the new spec (#1313)
* Updating Status based on the new spec

commenting OtlpTrace.Status.Type check

fixing test

undoing change to statuscanonicalcode

fixing tests

reiley's comments

SetStatus now saves enum instead of string

fixing changes after conversion

fixing redis tests

from http spec, if 1xx,2xx,3xx => unset, otherwise error.
from rpc spec, if ok => unset, otherwise error.

fixing sql tests

fixing redis tests

* fixing sqlclient framework tests

* adding benchmark to status

* changing from hashset to simple if, readding statuscode for grpc
2020-10-13 10:11:32 -07:00
Reiley Yang 71bb3635f5
ILogger integration - part 3 (#1328)
* extract common part

* make process/exporter generic

* update dependencies

* update all the tests and docs

* clean up

* changelog

* update readme

* prevent LogRecord to be inherited

* simplify example

* simplify the code

* revert accidental change
2020-10-07 09:55:54 -07:00
Eddy Nakamura 874f9d7863
CustomProperty improvements (#1261)
* CustomProperty improvements

updating tests

updating to RuntimeContextSlot

updating to runtimeContext

adding runtime/subscibe/flag benchmark

updating aspnet and http

updating ramaining instrumentation

* adding try/catch&log

* improve docs for enrich action

* Checking enrichment with sampler

* removing unneeded using

* updating changelog

* updating changelog

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-10-06 13:27:00 -07:00
Eddy Nakamura c7429d25c9
Normalizing format (#1289)
updating gitattributes

updating

updating

updating

Revert "Normalizing format"

This reverts commit b571e430a73f65605481ef0a622a372bc8a787ae.

Updating everything to utf-8

applying lf

Revert "applying lf"

This reverts commit a54947f24ba69eecc931525f2a69647040fdc28d.

updating config

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-09-19 09:45:29 -07:00
Alan West a5a2eb0a8a
Remove tags added by gRPC library in favor of OpenTelemetry tags (#1260)
* Remove grpc.method and grpc.status_code tags

* Remove unused usings

* Remove TODO that is probably a WONTDO

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-09-14 18:01:40 -07:00
Rajkumar Rangaraj 4ae9104ec5
Add SuppressInstrumentation to Grpc client (#1184)
* Added SuppressInstrumentation to Grpc client

* Modified DiagnosticSourceListener

* Remove comment

* PR Comments

* Revert change to TracerProviderSdk

* renamed parameter

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-09-09 22:12:36 -07:00
Eddy Nakamura c025116c3e
Replacing Tags for TagObjects and AddTag for SetTag (#1227)
* Replacing Tags for TagObjects and AddTag for SetTag

updating tests

updating tests

* removing toString from stackExchange test method

* tentative to solve redis test failure

* updating tests

* updating test

* checking for only one element

* Trying GetTagValue extension in http-in unit test projects.

* Grpc now uses GetTagValue.

* Updated new unit tests to use SetTag.

* Updated Http instrumentation for GetTagValue.

* Update Sql instrumentation to use GetTagValue.

* Updated Redis instrumentation to use GetTagValue.

* Removed references from test projects that weren't needed.

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-09-06 10:13:08 -07:00
Reiley Yang f6ef67bd33
Cleanup dispose/shutdown flow (#1142)
* improve comments

* only TracerProvider.Dispose will call processor.Shutdown

* add comments

* update test cases

* update test case

* cleanup nits

* fix plural form
2020-08-24 11:22:03 -07:00
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
Eddy Nakamura 3e1d7f1a20
Replacing variable names (#1134)
Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-08-21 19:01:47 -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
Rajkumar Rangaraj 7943d96938
Fix Samplers to match spec (#1037)
* Modified sampler to return Decision

* Added missing functionalites affected with conflict.

* Added test

* Fix test

* Removed IsAllDataRequested check from processor

* Checking if sampler is null.

* Adding code missed from conflict

* Incorporating PR feedback

* Fix test

* Removed OpenTelemetry.Trace.Samplers namespace

* Update to changelog

* Moved test to tracersdk

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-11 19:25:35 -07:00
Cijo Thomas 47a6fe7621
Refactor TracerProvider to make configuration easy. (#1027)
* Refactor TracerProvider to make configuration easy.

* build break fix

* MyExporter change

* format

* sql build fix

* fix

* test fix
2020-08-09 00:48:00 -07:00
Mikel Blanchard 73bff75ef6
Default Sampler update + ParentOrElse fix (#1013)
* Updated default sampler to match the spec. Fixed broken ParentOrElseSampler.

* Fixed http-in instrumentation creating Activity objects with invalid parents.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-05 15:35:11 -07:00
Alan West 362c1fe8b9
Add gRPC attributes for ASP.NET Core (#803)
* Change gRPC test project name and namespace

* Use SpanAttributeConstants in GrpcClientTests

* Add test for Grpc.AspNetCore instrumentation

* Add gRPC attributes for ASP.NET Core

* Prevent parallel execution of gRPC client and server test suites

* Add wait logic from AspNetCore tests ensuring end callback gets invoked

* Partial class for gRPC test to resolve test conflicts

Co-authored-by: Michael Goin <michaelgoin@gmail.com>

* Make "grpc" a const

* Set http.status_code attribute even on a gRPC invocation

* Fix GrpcFixture

* Add checks for http.* attributes to ASP.NET Core gRPC test

* Fix merge snafu

* Update changelog

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Co-authored-by: Michael Goin <michaelgoin@gmail.com>
2020-08-04 20:21:17 -07:00