Commit Graph

58 Commits

Author SHA1 Message Date
Eddy Nakamura a3bf19d450
Removing Todos (#1029)
* Removing Todos

renaming parameter

adding tests

updating spanbuilderShim

updating to internal

renaming to spanAttributes

solving build issue

adding spec reference

Continue Refactoring TracerProvider. (#1035)

* optimize the flow

* fix instrumenataion

* move mroe things to provider ctor

* move logic arounds

Co-authored-by: Reiley Yang <reyang@microsoft.com>

changing to class and following spec to replace value

replacing from default to null

updating package

adding xunit.runner

renaming method

* removing duplicated files

* adding some tests and updating to default constructor

* removing to be compliant to spec

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-11 07:50:53 -07:00
Alan West bd738f0447
End-to-end example applications (#936)
* Suite of example applications demonstrating context propagation with RabbitMQ

* Put System.* namespaces first

* Newline at EOF

* Fix markdownlint errors

* markdownlint fix

* Refactor WorkerService separating OpenTelemetry related logic from RabbitMQ boilerplate

* Refactor WebApi separating OpenTelemetry related logic from RabbitMQ boilerplate

* Use environment variables for RabbitMQ user/pass

* Add some comments

* Fix RabbitMQ default user/pass

* Use correct ActivityKind

* Add attributes following messaging specification

* Clearing a path through the RabbitMQ jungle

* Log something when sending/receiving a message

* Code style clean up

* Default logging to info level

* Create queue if it does not exist

* Rename controller to SendMessageController

* Refine the readme

* MarkdownCop

* Fix merge snafu

* Add null checks on activity

* Add a missed null check

* Use AddOpenTelemetry in ConfigureServices

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-08-09 23:59:10 -07:00
Cijo Thomas 1b01f3c98e
Add doc to sln (#1022) 2020-08-07 09:46:02 -07:00
Reiley Yang 79acec1bc6
Add custom exporter project (#1004)
* Add custom exporter project'

* manually resolve merge conflict

* update codecov ignore list
2020-08-04 21:03:43 -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
Reiley Yang 0bcf363e0d
Add custom sampler project (#1001)
* add custom sampler project

* add comment
2020-08-04 19:58:13 -07:00
Reiley Yang 90c5b3af11
Improve docs structure (#983)
* improve docs structure

* revert line ending

* adopt .net5-preview-8

* remove unused using
2020-08-03 16:46:48 -07:00
Eddy Nakamura a326550305
Minor improvements to OT (#972)
Adding copyright header to files, and other changes

adding headers

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-08-02 06:48:58 -07:00
Reiley Yang c612b40da4
Improve project props management (#966)
* improve project props management

* use less strict version

* add comment

* workaround redis test

* reduce the scope of change

* Revert "reduce the scope of change"

This reverts commit 059ef3a6ef956978c61b101ed5914203b214c2a0.

* revert

* try to fix docker

* try to fix docker

* manually update the sln file
2020-08-01 18:23:53 -07:00
Eddy Nakamura c68061fa0c
dotnet-format check (#958)
* dotnet-format check

updating name

updating order

Update dotnet-format.yml

updating job name

Updating files based on dotnet-format

updating sanitycheck

updating os

* updating workflows

* adding path to editorconfig

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2020-07-31 18:46:08 -07:00
Reiley Yang 637874f49e
Doc skeleton (#943)
* skeleton doc

* fix nits
2020-07-30 23:01:35 -07:00
Eddy Nakamura 38f86a9452
Enabling CodeCoverage (#937)
* Enabling CodeCoverage

* adding end line
2020-07-27 20:30:19 -07:00
Cijo Thomas bacbf3e676
Add docs to solution. Add more to the doc. (#906)
* Add docs to solution. Add more to the doc.

* text

* no nuget version
2020-07-23 18:38:50 -07:00
Eddy Nakamura 2dd8daa1e4
Splitting Instrumentation Projects (#890)
updating README

updating sql integration test

updating yml

updating dockerfile

updating readme

updating global.asax

updating version and readme

removing unused reference, adding properties folder to be similar to OT project

adding zipkin docker in comments

updating to standard2.1

removing unused usings

updating aspnet/aspnetcore methods naming

applying cijo's suggestions

updating projects to compile semantic file, updating comments

Splitting Instrumentation Projects

updating README

updating sql integration test

updating yml

updating dockerfile

updating readme

updating global.asax

updating version and readme

removing unused reference, adding properties folder to be similar to OT project

adding zipkin docker in comments

updating to standard2.1

removing unused usings

applying cijo's suggestions
2020-07-23 11:50:57 -07:00
Eddy Nakamura 3aca129967
Moving benchmark to test folder (#885)
* Moving benchmark to test folder

updating namespaces

updating path

Reiley comments

* updating paranthesis
2020-07-22 17:09:28 -07:00
Eddy Nakamura c4ff8ab640
renaming from Samples to Examples (#880)
* renaming from Samples to Examples

* updating changelog

* renaming from OT.Examples.name to Examples.name
2020-07-22 09:18:56 -07:00
Reiley Yang cc141cda0f
Avoid the "Win" trick (#862)
* remove Win hack

* remove Win from folder name
2020-07-21 12:13:55 -07:00
Eddy Nakamura 68d3c791e7
Updating samples folder path (#857)
* Updating samples folder path

* Updating from Web to AspNetCore

* updating paths and namespaces

* merging docfx, markdownlint and spellcheck to docs.yml
merging integration-redis and integration-sql to integration.yml

* updating files to work on vscode

* creating extensions.json to simplify usage

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-21 10:18:51 -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 52955d3f1f
Changing Zpages to Activity style (#821)
* Changing Zpages to Activity style

renaming file

Adding OT.Exporter.ZPages.Tests

updating targetframeworks

renaming classes

adding default value

* removing unused variables, applying vs suggestions

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2020-07-15 16:46:17 -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
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 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 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
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
Cijo Thomas 50638a9c31
Remove Logging Tracer and examples using the same. (#733) 2020-06-16 14:25:39 -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
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
Mike Goldsmith e11de97b25
Remove stackdriver exporter (#665) 2020-05-06 21:18:44 +01:00
Mike Goldsmith c731b7b38a
remove lightstep exporter (#663) 2020-05-06 12:34:38 -07:00
Reiley Yang 011b21054f
Remove application insights exporter (#658)
* remove application insights exporter

* switch example to use zipkin

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-05-04 13:49:49 -07:00
Paulo Janotti dacae6d50f
Update OpenTelemetry Protocol Exporter (#643)
* Update OpenTelemetry Protocol Exporter

Update the OTLP to version 0.3.0 of the proto files.

* Revert change to library resources

* Rename UseOpenTelemetryProtocol to UseOtlpExporter

* Rename UseOtlpExporter to UseOpenTelemetryProtocolExporter
2020-04-30 15:27:17 -07:00
Long Mai 09f008b037
refactor: rename to OpenTelemetry.Extensions.Hosting from OpenTelemetry.Hosting (#623)
* refactor: sln, csproj, and dir to Extensions.Hosting from Hosting

* refactor: ref Microsoft.Extensions.Hosting.Abstractions instead of concrete

* refactor: ns to Extensions.Hosting from Hosting

* docs: OpenTelemetry.Extensions.Hosting rename from OpenTelemetry.Hosting

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-04-27 14:08:39 -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
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 d5b4248261
JaegerExporter: Performance Improvements (#494)
* Initial work.

* First complete version of Jaeger with perf improvements.

* Added JaegerExporter benchmarks.

* More performance revisions.

* ValueTask perf improvements.

* Missed a couple tasks.

* Removed null check against struct.

* Tweaked how structs are used.

* Figured out why the structs were eating more memory. Fixed up unit tests.

* Reverted change to ToJaegerSpan extension signature.

* Fixed JaegerUdpBatcher not calling CloseAsync in dispose, fixed SpanExporters not being disposed.

* Reference System.Threading.Tasks.Extensions for net46 & netstandard2.0 builds of Thirft to add in ValueTask.

* Removed the fork of Thrift in favor of the official package.

* Increased number of spans per iteration in jaeger benchmarks. Switched ApacheThrift to PrivateAssets=all in jaeger exporter project.

* New algorithm for memory management.

* Fixed double-allocation of tags.

* Immutable structs. Added cancellationToken to IJaegerClient interface.

* Added lists that can be backed be pooled buffers.

* Everything in implementation folder is now internal.

* Return ref from PooledList indexer.

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-02-26 14:49:39 -08:00
Mikel Blanchard a7206200a5
Zipkin Exporter: Specify RemoteEndpoint (#483)
* Switched to System.Text.Json for .NET Standard 2.0 target. Added caching of ZipkinEndpoints. Added support for sending RemoteEndpoint to Zipkin API.

* Code review feedback.

* Code review.

* Zipkin performance improvements.

* Made json header static.

* Removed debug code.

* Bumped up the numbers of spans in benchmark to get more consistent results.

* Code review.

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-02-18 15:16:15 -08:00
SychevIgor 63d9bf145c
Asp.net core based sample of ApplicationInsights export (#433)
* Asp.net core based sample of ApplicationInsights export

* links to samples

* update links

* fixed solution

* fix merge issues

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-01-29 12:18:16 -08:00
Liudmila Molkova cc4665836f move ZPages to src and fix solution (#458) 2020-01-22 12:09:32 -08:00
HarnidhK 9c33a025e4 zPages project onboarding (#437)
* zPages project onboarding

This is the intital commit for zPages exporter

* Updating csproj for zPages

Removing Implementation folder from csproj since it is not used yet

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-01-14 00:15:58 -08:00
SychevIgor 4fc85d1c45 .net core 3.0 in maintenance mode and end of support will be in march 2020 (#424)
* .net core 3.0 in maintance mode and end of support will be in march 2020

* more 3.1

* revent covelet and update IHostingEnvironment Warning

* rerun github check
2020-01-08 09:07:42 -08:00
Liudmila Molkova 40a51b69bc
Move test infra to .NET Core 3.0 (#403)
* Add W3C TraceContext validation test app

* fix linux build

* some fixes

* Use ASP.NET Core test app as W3C test suite example

* broken solution

* remove new project

* move tests to 3.0

* update minver

* fix http tests to force 2.0

* minver is in common props, remove from projects

* move lightstep tests to 3.1
2019-12-19 13:46:57 -08:00
Cijo Thomas 35b71f1cc8 Nuke the old stats folder, basic Metric SDK. (#359)
* Add Promethues Exported relying on new Metric, to allow deleting of old Stats files.

* Counter fixes

* Add PrometheusExporter test project

* Nuke the Stats folder completely. Exporters are also deleted and they will be brought back with new metric api.
2019-11-26 15:31:31 -08:00
Peter Wiese 57e98ad61a Build OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj based on latest .proto files (#331)
* Build OpenTelemetry.Exporter.Ocagent.csproj based on latest .proto files

.proto files forked from https://github.com/open-telemetry/opentelemetry-proto
@4b6ff88e525739a2b1d2cbed619301076c6687e7

and build using Grpc.Tools

* Adding README file with a SHA for .proto files fork

* Moving OpenTelemetry.Exporter.Ocagent to OpenTelemetry.Exporter.OpenTelemetryProtocol
2019-11-11 11:17:28 -08:00
Peter Wiese 2a931fcdee Repair the build for the OpenTelemetry.Exporter.Ocagent.csproj (#330)
Apparently the build pipeline for the master branch ci is not looking
exclusively at the .sln, so this project must build.

This is simply a build fix and nothing else.

Adding the otelcol exporter to the .sln
2019-11-07 10:38:12 -08:00
Sergey Kanzhelev cb0630c8f9
icon is in the package (#325) 2019-11-06 11:19:23 -08:00
Sergey Kanzhelev 605760cf5a
Rename Abstractions to Api (#317)
* Rename Abstractions to Api

* fixed Api casing
2019-10-28 16:17:08 -07:00
James Newton-King e7bd851f32 Add OpenTelemetry.Hosting (#275)
* Add OpenTelemetry.Hosting

* Update README.md

* Docs and additional test
2019-10-17 22:05:39 -07:00
Liudmila Molkova 3e35c23b5f
Basic benchmarks (#262) 2019-10-08 17:42:07 -07:00
Liudmila Molkova 2e14b8c69c
remove Ocagent exporter (#235) 2019-09-27 15:37:51 -07:00