Commit Graph

78 Commits

Author SHA1 Message Date
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 cc41648685 Move TracerBuilderExtensions to the same namespace (#280) 2019-10-14 21:48:00 -07:00
Liudmila Molkova 3838e81aca minor style fixes (#274)
* usings outside in Abstractions

* Move usings outside of namespace and apply style

* more style fixes

* merge with master

* build fix
2019-10-14 11:57:21 -07:00
Bruno Garcia d48e702286 ref: Move using outside namespace (#277) 2019-10-12 10:03:45 -07:00
Liudmila Molkova 7141ee23d8
Tracing configuration API (#267)
* tracer factory configuration

* review

* default factory

* review

* Tests and readme

* Update README.md

Co-Authored-By: Austin Parker <austin@lightstep.com>

* null checks

* rebase from master
2019-10-11 18:53:11 -07:00
Liudmila Molkova afb1381bbd
Remove span builder (#268)
* Remove SpanBuilder

* tests

* more tests and readme

* review feedback
2019-10-11 15:47:19 -07:00
Liudmila Molkova 61fe06036a
Separate auto-collectors and make them accept Tracer (#266) 2019-10-09 09:29:29 -07:00
Liudmila Molkova 6097bb3136
Use IsEnabled DS callback to filter out requests (#259)
* Use IsEnabled DS callback to filter out requests

* Update src/OpenTelemetry.Collector.Dependencies/DependenciesCollectorOptions.cs

Co-Authored-By: Bruno Garcia <bruno@brunogarcia.com>

* Update src/OpenTelemetry.Collector.AspNetCore/RequestsCollectorOptions.cs
2019-10-08 17:24:46 -07:00
Liudmila Molkova d3b8133af6
Fix batching tests and processor improvements (#252) 2019-10-08 17:11:07 -07:00
Liudmila Molkova 6bf0e18d60
Rename TraceConfig to TracerConfiguration and remove Default (#258)
* TraceConfig to TracerConfiguration and remove Default

* Add TracerConfiguration file and fix namespace
2019-10-07 12:48:51 -07:00
Liudmila Molkova b7fd0e79d6
Remove tracestate class and use ienumerable instead (#257) 2019-10-03 13:38:38 -07:00
Liudmila Molkova ae98cb8d22
Update Resource SDK to work according to spec (#248)
* Update Resource SDK to work according to spec

* minor improvements

* fix tests

* merge conflicts
2019-10-03 12:53:39 -07:00
Wolfgang Ziegler 7453ec3258 Named tracers (#239)
* Implementing the "Named Tracers" proposal for .NET

* Improve Named Tracers implementation.

LoggingTracer now prints "LibraryResource" information (name + version)
Make "LibraryResource" available on Spans.

* Improved and refactored Tracer creation

* Fixed issues and tests after merge

* Implemented PR feedback

* Implementing the "Named Tracers" proposal for .NET

* Improve Named Tracers implementation.

LoggingTracer now prints "LibraryResource" information (name + version)
Make "LibraryResource" available on Spans.

* Improved and refactored Tracer creation

* Fixed issues and tests after merge

* Implemented PR feedback

* Implement PR review feedback

* Organize using directives

* Update src/OpenTelemetry.Collector.AspNetCore/RequestsCollector.cs

Co-Authored-By: Liudmila Molkova <lmolkova@microsoft.com>

* Update RequestsCollector.cs
2019-10-03 10:05:16 -07:00
Peter Wiese 84cdde8d5c Support explicit timestamps for OpenTracing ISpanBuilder and ISpan operations (#256) 2019-10-02 13:20:37 -07:00
Cijo Thomas 0fade6c9f3 Update ApplicationInsightsSDK, DiagnosticSource and minor application… (#249)
* Update ApplicationInsightsSDK, DiagnosticSource and minor applicationinsights exporter fixes

* remove sys diagnostic on test proj as its is referred via abstractions
2019-10-01 12:20:38 -07:00
Liudmila Molkova 7785258c2b
Remove IEvent interface (#246)
* remove IEvent interface

* Update src/OpenTelemetry.Abstractions/Trace/Event.cs

Co-Authored-By: Bruno Garcia <bruno@brunogarcia.com>
2019-10-01 11:55:10 -07:00
Liudmila Molkova ad6ad5c5c2
remove IScope (#247) 2019-10-01 11:36:02 -07:00
Liudmila Molkova 754c80a702 Remove ILink interface (#245) 2019-10-01 11:04:58 -04:00
Liudmila Molkova 91e1b45c25 fix batching processor tests (#244) 2019-10-01 10:45:43 -04:00
Liudmila Molkova bae63f8c34
SpanContext.Create to public constructor (#233)
* Make SpanContext struct and make constructor public
do not allow link from blank context

back to class

* up
2019-09-30 08:19:14 -07:00
Liudmila Molkova 58717abf27
Implement batching processor and use it by default (#228)
* Implement batching processor and use it by default

* up

* Tracer ctor fix

* relax tests checks for number of export calls

* Update src/OpenTelemetry/Trace/Export/SimpleSpanProcessor.cs

Co-Authored-By: Bruno Garcia <bruno@brunogarcia.com>

* relax tests
2019-09-26 12:05:47 -07:00
Liudmila Molkova 762b5ce0bc
Aligns exporting pipeline with SDK spec (#227)
* SpanProcessor and exporter changes

* SpanProcessorOnStart

* fix examples
2019-09-23 12:34:33 -07:00
Sergey Kanzhelev 325de75b48
Added decision (#213)
* added IDecision class

* fixed copy/paste issue

* fixed copy/paste issue

* fix bugs

* make decision a struct

* addressed PR feedback
2019-09-23 12:12:32 -07:00
Liudmila Molkova 8525f389ad
remove SpanData (#222) 2019-09-23 09:00:32 -07:00
Liudmila Molkova be7b57fefc
Expose Attributes, Link, Events, Start/End timestamps on span (#221)
* Expose Attributes, Link, Events, Start/End timestamps on span

* fix

* fix tests
2019-09-23 08:35:25 -07:00
Bruno Garcia 68859e138f fix: default DateTime is invalid ahead of UTC (#219)
* Resolves: #218
2019-09-22 10:00:18 -07:00
Liudmila Molkova 888f94a44e Clean up trace config (#216) 2019-09-20 23:29:41 -07:00
Liudmila Molkova 7870dbbbc7 Micro-fix for links propery on Application Insights exporter (#215) 2019-09-20 23:14:05 -07:00
Liudmila Molkova 207684787b Use DateTimeOffset instead of DateTime (#214) 2019-09-20 23:05:50 -07:00
Sergey Kanzhelev a793f5f542
a few minor warnings (#212) 2019-09-20 22:58:57 -07:00
Liudmila Molkova ee1458466c
Start and end timestamps on span (#211)
* Allow setting start and end time on Span

* Fix redis collector to set timestamps and never use span data

* review comments
2019-09-20 15:11:51 -07:00
Liudmila Molkova 07fbc67d20
Add Timestamp on the event and remove ITimedEvent (#210)
* Set timestamp on the event and remove iTimedEvent

* Update src/OpenTelemetry.Abstractions/Trace/Export/ITimedEvents.cs

Co-Authored-By: John Du Hart <jduhart@mdsol.com>

* Update src/OpenTelemetry.Abstractions/Trace/Export/ITimedEvents.cs

Co-Authored-By: John Du Hart <jduhart@mdsol.com>
2019-09-20 14:15:41 -07:00
Liudmila Molkova 7b6f8b94d4
Remove Link.FromActivity (#201) 2019-09-11 10:26:04 -07:00
Liudmila Molkova b9132a0699
Change ApplicationInsights schema for links (#202) 2019-09-11 10:18:25 -07:00
Peter Wiese 541390ffb1 Initial implementation of the OpenTracing bridge. (#197)
This is, where possible, a direct port of the current Java shim. There are some holes/TODOS. Notably:

-Missing the Binary injection/extraction of the span context. This doesn't exist with the current implementation of OpenTracing yet.
-Missing explicit timestamps for calls to OpenTracing ISpan::Log.
-Missing explicit timestamps for calls to OpenTracing ISpan::Finish
-Various calls to set/get baggage are not implemented. Requires OpenTelemetry DistributedContext to be finalized.

Other oddities worth nothing:

-The SpanBuilderShim has some conditional code for calling OpenTel SetCreateChild(true|false)
-The ScopeManagerShim is actively tracking scopes returned by calls to OpenTel WithSpan and associated those with the OpenTel ISpan used when calling WithSpan.

I tested this shim against an ASP.NET Core 3 Preview 8 service wired up with OpenTracing netcore and grpc collectors and exporting to Jaeger backend.

The included tests are unit tests only; no E2E tests.
2019-09-06 15:41:32 -07:00
Peter Wiese cf33e86290 Move reusable Collector related classes into the OpenTelemetry SDK (#183)
* Move reusable Collector related classes into OpenTelemetry

Four classes were essentially duplicated between the aspnetcore and dependencies collector projects. We can shared these classes between the two projects by making some generic.

* Innocuous whitespace change to trigger the build again. There is an unrelated non-deterministic test that is failing

* Increasing the allowable range from AssertApproxSameTimestamp from 10ms to 20ms. Tests keep failing with times like 12 and 14ms

* Removing the PropertyFetcher from the public interface

* Applying a bug fix in the PropertyFetcher. The same kind of fix was done in the OpenTracing ASP.NET Core instrumentation package
2019-08-28 20:41:30 -07:00
Austin Parker 78e5053b8d
Add LightStep Exporter (#185) 2019-08-26 17:18:23 -04:00
Peter Wiese ea2a24492c Don't reference Thrift as NuGet package from the Jaeger exporter. (#193)
* Don't reference Thrift as NuGet package from the Jaeger exporter.

Include Thrift.dll in the lib directory of the export package.

See https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#project-to-project-references for a description of these MSBuild items.

Here is the generated .nuspec file for the Jaeger exporter now.

```xml

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>OpenTelemetry.Exporter.Jaeger</id>
    <version>0.2.0-alpha.16</version>
    <authors>OpenTelemetry authors</authors>
    <owners>OpenTelemetry authors</owners>
    <requireLicenseAcceptance>true</requireLicenseAcceptance>
    <license type="expression">Apache-2.0</license>
    <licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
    <projectUrl>https://opentelemetry.io/</projectUrl>
    <iconUrl>https://opentelemetry.io/img/logos/opentelemetry-icon-color.png</iconUrl>
    <description>Package Description</description>
    <tags>Tracing OpenTelemetry Management Monitoring Jaeger distributed-tracing</tags>
    <repository type="git" url="https://github.com/pcwiese/opentelemetry-dotnet.git" commit="5c5f2fc191c8a5b1a5b419bbe2b530fee1a567f4" />
    <dependencies>
      <group targetFramework=".NETFramework4.6">
        <dependency id="OpenTelemetry.Abstractions" version="0.2.0-alpha.16" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETStandard2.0">
        <dependency id="OpenTelemetry.Abstractions" version="0.2.0-alpha.16" exclude="Build,Analyzers" />
      </group>
    </dependencies>
  </metadata>
  <files>
    <file src="bin\Debug\net46\Thrift.dll" target="lib\net46\Thrift.dll" />
    <file src="Z:\src\opentelemetry-dotnet\src\OpenTelemetry.Exporter.Jaeger\bin\Debug\net46\OpenTelemetry.Exporter.Jaeger.dll" target="lib\net46\OpenTelemetry.Exporter.Jaeger.dll" />
    <file src="Z:\src\opentelemetry-dotnet\src\OpenTelemetry.Exporter.Jaeger\bin\Debug\net46\OpenTelemetry.Exporter.Jaeger.xml" target="lib\net46\OpenTelemetry.Exporter.Jaeger.xml" />
    <file src="bin\Debug\netstandard2.0\Thrift.dll" target="lib\netstandard2.0\Thrift.dll" />
    <file src="Z:\src\opentelemetry-dotnet\src\OpenTelemetry.Exporter.Jaeger\bin\Debug\netstandard2.0\OpenTelemetry.Exporter.Jaeger.dll" target="lib\netstandard2.0\OpenTelemetry.Exporter.Jaeger.dll" />
    <file src="Z:\src\opentelemetry-dotnet\src\OpenTelemetry.Exporter.Jaeger\bin\Debug\netstandard2.0\OpenTelemetry.Exporter.Jaeger.xml" target="lib\netstandard2.0\OpenTelemetry.Exporter.Jaeger.xml" />
  </files>
</package>

```

* Reference Thrift directly from the Jaeger exporter test project
2019-08-26 10:25:42 -07:00
Wolfgang Ziegler 5c5f2fc191 Make OpenTelemetry.Trace.Status a struct type. (#191)
* Change "OpenTelemetry.Trace.Status" to a struct type.

Status carries mainly a code representation operation state and is a good candidate for a value type.
This can potentially improve GC and memory pressure.
2019-08-20 09:58:09 -04:00
Peter Wiese 9a7fde5719 Adding project placeholders for the OpenTracing shim (#184)
* Adding project placeholders for the OpenTracing shim

Issues:
[Create an OpenTracing Bridge](https://github.com/open-telemetry/opentelemetry-dotnet/issues/28)

* Reference Abstractions instead of the SDK initially

* Innocuous change to trigger the build again. Looks like a non-deterministic transient test failure to me
2019-08-12 11:47:44 -07:00
Liudmila Molkova 4cbc55c67d Remove redundant Thread.Sleep(minute) (#179) 2019-08-08 08:36:01 -04:00
Liudmila Molkova ff8f7b6d44
Better Assert (with error message) for timestampt range (#168) 2019-08-06 21:28:19 -07:00
pcwiese fbdd3a1f34 Multiple calls to DiagnosticSourceSubscriber::Dispose throw nullref (#178)
* Multiple calls to DiagnosticSourceSubscriber::Dispose would throw nullrefs.

All Dispose methods should be idempotent.

- Switched the dispose flag check(s) from using Volatile to using Interlocked.CompareExchange and Interlocked.Read
- Add null checks to the arguments
- Added a simple unit test class for this internal class

* Wrap InternalVisibleTo in a #if SIGNED preprocessor block

* Applying the same Dispose pattern to DiagnosticSourceSubscriber in the Collector.Dependencies assembly
2019-08-06 20:49:07 -07:00
Liudmila Molkova f6fc8d7a83
ApplicationInsights exporter improvements (#172) 2019-08-02 10:49:38 -07:00
Liudmila Molkova 64d9fbf5e0
Improvements in http in and out auto-collectors (#162) 2019-07-26 11:53:42 -07:00
Liudmila Molkova 487f358caf
Update to DiagnosticSource preview 7 and leverage Activity.SetIdFormat() (#160) 2019-07-24 18:15:41 -07:00
Tim Wegner 175ae3bf0d Dev/twegner/issue 139 (#153)
* Removing ExportComponent

* Updating IExportComponent references

* Updating references to ExportComponent
2019-07-24 17:45:25 -07:00
Bruno Garcia d1e66e1e0b Build all targets in all platforms. (#155)
* build all targets in all platforms
Resolves #154

* Tests for netfx run only on Windows

* AppInsights can build x-plat

* fix: TFMs for Jaeger
2019-07-24 10:46:09 -07:00
PS-EGHornbostel 8e1d8fa47e Jaeger exporter implementation (#132)
* Fix visual studio dotnet core build task

* Added CNCF Jaeger exporter support

https://github.com/open-telemetry/opentelemetry-dotnet/issues/77

* possible fix for win32 build issue.

* Fix windows build by adding Thrift source

* Fix yet more windows build issues.

* fix another style issue.

* fix reference to System.Net.Http

* remove unnecessary conditional framework reference.

* Update lib/Thrift/Transports/Client/TStreamClientTransport.cs

Co-Authored-By: Bruno Garcia <github@brunogarcia.com>

* Update lib/Thrift/Transports/Client/TStreamClientTransport.cs

Co-Authored-By: Bruno Garcia <github@brunogarcia.com>

* Added the conditional for netstandard2.0

* remove IDisposable TODO comments.

* Update src/OpenTelemetry.Exporter.Jaeger/Implimentation/EmitBatchArgs.cs

Co-Authored-By: Bruno Garcia <github@brunogarcia.com>

* Add readme with thrift fork info.

* cleanup after merge.

* WIP remove thrift code

* Use prepackaged Apache Thrift assembly

* wrap EmitBatch

* Revert "wrap EmitBatch "

This reverts commit 9aaa1388ba.

* Revert "Use prepackaged Apache Thrift assembly"

This reverts commit fa5fbd8e6c.

* Revert "Use prepackaged Apache Thrift assembly"

This reverts commit fa5fbd8e6c.

* Revert "WIP remove thrift code"

This reverts commit bbbcf470e8.

* Add missing ConfigureAwait(false) to Thrift async calls.

* Added Thrift fork differences to README.md

* WIP Jaeger Unit tests

* Fix build after merge.

* WIP Jaeger Unit tests - Span conversion to Jaeger Thrift format

* WIP Jaeger Unit tests - Span conversion to Jaeger Thrift format - cleanup

* Clean up merge issues

* WIP

* WIP cleanup

* more testing WIP

* use pattern matching for attribute conversion

* WIP cleanup after timestamp removal.

* WIP

* WIP UDP integration test

* Update src/OpenTelemetry.Exporter.Jaeger/Implimentation/Batch.cs

Co-Authored-By: Bruno Garcia <github@brunogarcia.com>

* remove solution-explorer

* add to gitignore

* refactored List<T> to IEnumerable<T>

* Fix unit test bug

* Add integration test

* cleanup

* fix unix epoch conversion

* Update Thrift expected payload in unit test.

* fix build issues

* fix typo

* fix solution
2019-07-23 19:47:52 -07:00
Liudmila Molkova 2183c425e8
TimedEvents clean up (#152) 2019-07-16 16:25:52 -07:00