Commit Graph

28 Commits

Author SHA1 Message Date
Mikel Blanchard 94f67d8a8c
Revert "[sdk] Use reflection and dynamic types to start providers (#4151)" (#4173)
This reverts commit b549e12148.
2023-02-09 10:14:12 -08:00
Mikel Blanchard b549e12148
[sdk] Use reflection and dynamic types to start providers (#4151)
* Remove StartWithHost extension and using reflection to do the work in SDK.

* Warning cleanup.

* Fix up.

* Improved logging.

* Remove OpenTelemetry.Extensions.Hosting dependency from examples & docs.

* Test fixes.

* Fixes and test updates.

* Bug fix.

* Patch CHANGELOGs.

* Clean up.

* Support Azure Functions TelemetryHostedService dependency inspection logic.

* Code review.

* Code review.

* Code review.

---------

Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
2023-02-08 15:20:02 -08:00
Mikel Blanchard 9836d3addb
[DependencyInjection] Introduce new package and refactor SDK (#3923) 2022-12-08 15:24:44 -08:00
Timothy Mothra e29f8443e2
remove `ImplicitUsings disable` from projects (part 5) (#3989)
* remove ImplicitUsings disable from projects.
ZPages

* Hosting

* Propagators
2022-12-08 10:51:34 -08:00
Mikel Blanchard 92c1afdfc7
Update the library authro guidance on the hosting registration extensions. (#3719) 2022-10-03 10:19:06 -07:00
Mikel Blanchard 6ff512cf60
[Metrics] Improve dependency injection support in meter provider build-up using SDK (#3646)
* Mirror TracerProviderBuilder dependency injection API onto MeterProviderBuilder.

* Nullable annotations.

* Warning cleanup.

* Warning cleanup.

* Public API updates.

* Warning cleanup.

* Public API updates.

* CHANGELOG updates.

* Warning cleanup.

* Fixes.

* Tests.
2022-09-12 13:22:51 -07:00
Mikel Blanchard e6d39b8b14
[Tracing] Improve dependency injection support in tracing build-up using SDK (#3533)
* TracerBuilder depedency injection improvements.

* Fixes and API updates.

* Update skipped test.

* Tweak.

* Tweaks.

* Test fix.

* Turn on options in TracerProviderBuilderBase.

* Updated CHANGELOGs.

* Added XML comments to AddOpenTelemetryTracing methods.

* Tweaks.

* Added export helpers and restored removed API from hosting library so that there is no breakage during upgrades.

* Export extension tweaks.

* Tweak.

* Tracer builder improvements.

* Fix hosting multiple configurations test.

* Cleanup.

* Cleanup and fixes.

* Added "UseOpenTelemetry" extensions.

* Cleanup.

* Code review.

* Code review.

* Rename SDK extension "Configure" and restore "Add" in the hosting lib.

* Doc clarification.

* Some test coverage.

* README updates.

* Fix double dispose of TracerProvider when using Sdk.CreateTracerProviderBuilder.

* AddExporter tests.

* More test coverage.

* More test coverage.

* Code review.
2022-08-29 13:14:24 -07:00
Alan West a2c1b6e69e
Invoke SDK initialization when using OpenTelemetry.Extensions.Hosting (#2901) 2022-02-16 06:48:45 -08:00
Michael Maxwell d7afc1bcb0
Simplify how to call `Guard` methods (#2894)
* try adding CallerArgumentExpression - errors

* remove nameof for null guard only available in net3+

* if null or empty

* if null or whitespace

* rest

Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2022-02-15 17:54:02 -08:00
Michael Maxwell 18d73c59f0
Make Guard method names more explicit (#2762)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2022-01-12 08:02:13 -08:00
Michael Maxwell 2a221722a1
Use Guard class and Debug.Assert for recent developer changes (#2540)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2021-10-28 10:42:38 -07:00
Michael Maxwell 6e6afdbc36
Identified all exception throws in code base (#2416) 2021-10-18 10:29:54 -07:00
Mikel Blanchard 38ee521b24
Hosting: Support metrics registration via IServiceCollection & deferred configuration (#2412)
* Add metrics support to hosting lib.

* Bug fixes and some public api additions.

* Added missing zipkin publicapi files.

* Unit tests.

* CHANGELOG updates

* Fixes

* Code review.

* Update src/OpenTelemetry.Extensions.Hosting/CHANGELOG.md

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

* Code review.

* Warning fixup.

Co-authored-by: Reiley Yang <reyang@microsoft.com>
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2021-09-27 10:30:10 -07:00
Mikel Blanchard 9589345708
Hosting: README documentation + tweaks (#2080)
* Documentation for hosting scenarios. Added exceptions for invalid deferred actions.

* Allow configure callbacks to register other configure callbacks.

* Added a nested configure registration test.

* Lint.

* More tests, bug fixes, and simplification.

* Switched order of extension method example.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2021-06-22 11:29:19 -07:00
Mikel Blanchard 0208fd69f5
Dependency injection support (#1889) 2021-03-26 11:36:18 -07:00
Cijo Thomas 38e058f92c
Removed AddOpenTelemetryTracing method which takes Func returning TracerProvider (#1456)
Co-authored-by: Eddy Nakamura <ednakamu@microsoft.com>
2020-11-04 12:17:36 -08: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
Cijo Thomas fd7876416f
Renaming to AddOpenTelemetryTracing (#1209)
* AspNet Instrumentation docs

* Renaming to AddOpenTelemetryTracing

* Revert "AspNet Instrumentation docs"

This reverts commit 4cbb620533.

* typo

* changelog entry
2020-08-31 17:32:29 -07:00
Cijo Thomas 6377d6bd87
Renamed extension methods from AddOpenTelemetry to AddOpenTelemetryTracerProvider (#1138)
* Renamed extension methods from AddOpenTelemetry to AddOpenTelemetryTracerProvider

* ununsed removal

* remove unnecessary test

* build fix
2020-08-21 21:28:10 -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
Cijo Thomas 920b0ed8d2
Provide MeterProvider to replace MeterFactory to be in sync with spec. (#919)
* Provide MeterProvider to replace MeterFactory to be in sync with spec.

* move OpenTelemetrymetrics to metrics folder

* Update examples/Console/TestPrometheusExporter.cs

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

* Sdk.CreateTracerProvider CreateMeterProvider

* move Sdk to root

* makr Sdk static

Co-authored-by: Reiley Yang <reyang@microsoft.com>
2020-07-24 15:27:21 -07:00
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
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
Eddy Nakamura a2b1b45c94
Enable unique EventSource for each project (#879)
* Enable unique EventSource for each project

* updating using place from Hosting project

* InstrumentationEventSource is now internal, adding EventSource to Hosting project

* removing unused methods, updating messages
2020-07-22 07:34:28 -07:00
Cijo Thomas bd65fd2132
Remove TracerFactory from Extensions.Hosting project (#790)
* Removed hosting extensions using tracerfactory

* rename

* test

* comment
2020-07-09 09:40:51 -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 30f841b2ef
Remove year from Copyright header (#671)
* Remove year from Copyright header

* some projects were unloaded and hence change didnt apply. this commit fixed it
2020-05-07 11:53:43 -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