Commit Graph

31 Commits

Author SHA1 Message Date
Alan West 89a740e20a
MetricReader TemporalityPreference (#3153) 2022-04-12 13:00:04 -07:00
Reiley Yang c1257c0ffb
Remove unused stuff in PrometheusExporter (#2908) 2022-02-17 07:16:34 -08:00
Mikel Blanchard e871c27316
PrometheusExporter: New concurrency handling for scrape middleware + http server (#2610)
* PoC for coordinating prometheus pull threads.

* Allocation free on .NET Core 3.1+ & locks are now tied to a specific exporter.

* Use CollectionManager in HttpServer. Remove delegate allocation.

* Bug fixes and benchmark updates.

* Configurable cache duration & bug fixes.

* Unit tests and bug fixes.

* More interesting unit test.

* Sealed PrometheusCollectionManager.

* Nits.

* CHANGELOG update.

* Doc tweaks.

* README update.

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2021-11-15 12:02:03 -08:00
Reiley Yang 5e369a6af1
update promtheus exporter benchmark (#2607) 2021-11-14 17:00:04 -08:00
Reiley Yang bb2b743fc8
Realloc when run out of serialization buffer (#2584) 2021-11-09 21:54:22 -08:00
Reiley Yang 11654f19e2
Solve PrometheusExporter race condition (step 1) (#2553)
* prom prototype

* minor refactor

* improve mem

* skeleton of the PrometheusSerializer

* a working server

* clear up test

* specialize netframework

* clean up

* update test

* fix unit test

* minor improvement

* comment

* escape metric names

* handle inf/nan

* minor name change

* nit

* more assertion

* patch for old frameworks

* add comment explaining why we use empty string if the label value is null

* Updated PrometheusExporterMiddleware for new PrometheusSerializer API.

* Added some exception handling.

* Test fix.

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
2021-11-09 13:30:28 -08:00
Mikel Blanchard 1a9ec3d92d
Added integration test for PrometheusExporterMetricsHttpServer. (#2465)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
2021-10-07 13:31:52 -07:00
Mikel Blanchard dc24fe1485
PrometheusExporter: Project cleanup and middleware fixes (#2414) 2021-09-28 12:53:22 -07:00
Michael Maxwell c60dc3697c
Delete unused `using` statements (#2411) 2021-09-27 10:07:46 -07:00
Reiley Yang 15981dfd7f
Improve Metrics pull export mode (#2389) 2021-09-22 10:14:58 -07:00
Reiley Yang d30746e5fc
refactor MetricReader Collect/OnCollect (#2380) 2021-09-17 16:20:38 -07:00
Reiley Yang 5deeb07080
Add metrics exporter modes (#2353) 2021-09-15 11:42:15 -07:00
Reiley Yang 886b39f0fa
Refactor MetricExporter AggregationTemporality (#2347) 2021-09-13 21:35:53 -07:00
Cijo Thomas 16b3188496
Metrics -> Main (#2332)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
Co-authored-by: Michael Maxwell <micmax@microsoft.com>
2021-09-10 15:34:54 -07:00
Utkarsh Umesan Pillai 54d46d80a0
Remove unncessary usings (#2213) 2021-07-29 17:27:28 -07:00
Cijo Thomas 7c611c8537
Metrics to Main (#2174) 2021-07-22 07:35:38 -07:00
Cijo Thomas 29995ec245
Remove metrics from 1.0.0 release (#1743)
* Remove metrics from 1.0.0 release

* remove docs for metrics

* public api change
2021-01-29 10:05:50 -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
Reiley Yang 552728a7bc
use OpenTelemetry and otel consistently (#1158) 2020-08-24 18:06:39 -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 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
Cijo Thomas 3b506f8cd9
Modify Metric record to not use generic. (#640)
* Modify Metric to not have generic. Instead create separate classes for long and double

* refactor exporter to extract common code into method

* minor

* Fix prometheus serialization
2020-04-28 17:16:56 -07:00
Cijo Thomas 2e7e93cc01
Metric Push Controller and basic config (#599)
* Add PushMetricController

* unit test

* Add MeterBuilder and MeterFactory

* adjust tests

* correct prometheus example

* Minors

* small

* Prometheus test

* Fix Prom Middleware test

* few small fixes

* Address comments

* avoid meter to metersdk cast

* one test

* comment

* test fx

* timing adjustment

* minor

* fix Eventname

* avoid unnecessary copy of metric list

* fix trailing spaces etc after merge

Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
2020-04-16 16:08:05 -07:00
Cijo Thomas 8efdd0a42d
Adds MinMaxSumCount aggregator. (#529)
* Adds MinMaxSumCount aggregator. Refactored aggregators to have common interface to emit export record.

* Remove unwanted namespace import

* remove implementation folder which is empty now

* Address PR comments. Add unit test and TODOs

* Address comments.
2020-03-11 10:55:34 -07:00
Mike Goldsmith 9ddcc0adcc Refactor PrometheusExporter not hold internal HttpListener (#428)
* add extension methods to register prometheus exporter

- IApplicationBuilder
- WebHostBuilder

* update http and hosting abstractions packages to 2.2.0

* fix web host extensions

* extract metricHttpServer from PrometheusExporter

* remove moq dependency in promethus tests

* remove IApplicationBuilder and IWebHostBuilder prometheus extensions

* revert changes to prometheus csproj

* rename MetricsHttpServer to PrometheusExporterMetricsHttpServer

* add IDisposeable to PrometheusExporterMetricsHttpServer

* refactor PrometheusExporterMetricsHttpServer to not require PromethusOptions as param

* move CancellationToken from constructor to Start method

* check http servere is both not null and listening before calling stop

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-01-22 22:22:26 -08:00
Cijo Thomas 84ac241543 Metrics part 2 (#383)
* 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.

* Add export and processor with facotry

* fix counterhandle and implement collect in metersdk

* use labelset encoding as key

* add gaugesdk

* creation of GaugeSDK

* Collect Gauges as well

* added a basic test

* test

* add metername

* move aggregator to separate namesace

* Add measure instrument with ExactAggregator

* collect is under lock

* modified prometheus exporter

* rename simpleprocessor to ungrouped batcher

* minor

* small changes

* build fix attempt

* make timespn optional in bacther

* buidl ix

* prom test project update

* few comments addressed

* remove tests

* test sample change duration

* time

* no delay
2019-12-11 10:40:16 -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
Bruno Garcia d48e702286 ref: Move using outside namespace (#277) 2019-10-12 10:03:45 -07:00
Bruno Garcia 1c6d191281 ref: Rename Open Census to Open Telemetry (#188) 2019-08-19 13:26:42 -07:00
Bruno Garcia f6e400e02c dhere to coding style (#116)
* .editorconfig defines to use var
2019-06-21 09:02:22 -07:00
Sergey Kanzhelev b11593d2d6 find and replace OpenCensus -> OpenTelemetry 2019-05-10 10:30:04 -07:00