* use the existing storage for sync or async instruments of the same name. add tests
* add hash and name case insensitive hash for InstrumentDescriptor. Update storage registry to use the hash and equality structs. Add tests.
* don't allocate heap in the hash. fix some ci failures
* fix a few more ci failures.
* move the instrument descriptor ostream operator to meter.cc to not leak the ostream header and keep the meter instrument creation warning implementation in the same file
* adds instrument descriptor tests
* add comments
* Move case-insensitive equals method and IsDuplicate method into InstrumentDescriptorUtils struct. Add log streamable wrappers for scopes and instrument descriptors. Add tests for correcitve views for name and description duplicates
* fix iwyu errors
* duplicate instrument log message improvements to match spec. minor test additions/cleanup
* changelog entry
* address review feedback. Add Ascii to the name of the instrument util case-insensitive equal function
* address feedback: short circuit the instrument descriptor CaseInsensitiveAsciiEquals and IsDuplicate checks
* fix comments
---------
Co-authored-by: Tom Tan <lilotom@gmail.com>
Co-authored-by: Marc Alff <marc.alff@oracle.com>
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
* add base2 expo histo aggregation
* add base2 expo histo, test, benchmark
* add prom, otlp exporter and example
* add ostream exporter and example
* update vscode launch
* run tools/format.sh
* add grpc exporter target switch for unix sockets
* Added ConvertExponentialHistogramMetric unit test
* Update the osstream_metric_test with ExponentialHistogram
* update CHANGELOG.md
* markdown lint
* Comment non-used function add missing includes
* add metrics dependency to otlp exporters test build
* run format
* remove unused function definition
* Added empty line in the end of a test file and removed comments
* Fix windows build errors
* fix iwyu warnings
* add comment to trigger pr update
* fix additional iwyu warnings
* Fix iwyu warning
* Fix include order in base2_exponential_histogram_aggregation.h
* Add kcumulative and kdelta aggregation temporality test with collect calls for base2 histogram aggregation
* add prelim bucketing checks
* Tested the exp2 constructor with point data
* Fix missing include in sync histogram test
* move diff and merge to use union of all buckets approach
* make get a const method
* update base2 expo hiso diff test
* add base2 expo histo test with sync storage collect
* uncomment examples
* format
* use static_cast
* fix comments
* update changelog
* Fix comments and errors in the pipeline
* Update sdk/src/metrics/aggregation/base2_exponential_histogram_aggregation.cc
Co-authored-by: Tom Tan <lilotom@gmail.com>
* remove unused code
* set max_buckets minimum to 2
* Revert otlp grpc client changes
Propose change in follow up PR
* [wip] make buckets unique ptr
* refactor unique_ptr for buckets with deep copies
* format
* update otlp serialization test with unique ptr
* format
* Small pipeline fixes
* iwyu fix
* remove boundary and format
---------
Co-authored-by: Ruslan Nigmatullin <euroelessar@gmail.com>
Co-authored-by: Felipe C. Dos Santos <felipe.santos.k@gmail.com>
Co-authored-by: Tom Tan <lilotom@gmail.com>
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
Co-authored-by: Felipe C. Dos Santos <42920697+felipesantosk@users.noreply.github.com>
* Add synchronous gauge
* Add ABI Version macro, update tests
* Fix function description
* Fix formatting
* Remove ABI macros from SDK.
* Add error log for gauge delta temporality.
* Fix formatting
* Apply suggestions from code review
Move kGauge to the end, for better ABI compatibility.
---------
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
Co-authored-by: Marc Alff <marc.alff@free.fr>
* Fix overflow in timeout logic
Also use steady clock consistently.
Prior to this change, the test would fail under ASAN:
bazel test --config=asan --test_output=errors //sdk/test/metrics:meter_provider_sdk_test
INFO: Analyzed target //sdk/test/metrics:meter_provider_sdk_test (0 packages loaded, 0 targets configured).
FAIL: //sdk/test/metrics:meter_provider_sdk_test (see /private/var/tmp/_bazel_punya/e3bd968ba61238cdeb1a5537fc3dbf7d/execroot/_main/bazel-out/darwin_arm64-fastbuild-asan/testlogs/sdk/test/metrics/meter_provider_sdk_test/test.log)
INFO: From Testing //sdk/test/metrics:meter_provider_sdk_test:
==================== Test output for //sdk/test/metrics:meter_provider_sdk_test:
Running main() from gmock_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MeterProvider
[ RUN ] MeterProvider.GetMeter
[Warning] File: sdk/src/metrics/meter_provider.cc:65 [MeterProvider::GetMeter] Library name is empty.
[Warning] File: sdk/src/metrics/meter_provider.cc:65 [MeterProvider::GetMeter] Library name is empty.
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__chrono/duration.h:102:59: runtime error: signed integer overflow: 9221646818050376183 * 1000 cannot be represented in type '_Ct' (aka 'long long')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__chrono/duration.h:102:59 in
================================================================================
INFO: Found 1 test target...
Target //sdk/test/metrics:meter_provider_sdk_test up-to-date:
bazel-bin/sdk/test/metrics/meter_provider_sdk_test
INFO: Elapsed time: 2.251s, Critical Path: 2.13s
INFO: 5 processes: 5 darwin-sandbox.
INFO: Build completed, 1 test FAILED, 5 total actions
//sdk/test/metrics:meter_provider_sdk_test FAILED in 0.6s
/private/var/tmp/_bazel_punya/e3bd968ba61238cdeb1a5537fc3dbf7d/execroot/_main/bazel-out/darwin_arm64-fastbuild-asan/testlogs/sdk/test/metrics/meter_provider_sdk_test/test.log
Executed 1 out of 1 test: 1 fails locally.
Fix overflow in periodic_exporting_metric_reader
* Add missing tests to Bazel build by globbing test files
Previously, we were missing
* instrument_metadata_validator_test
* observable_registry_test
* cardinality_limit_test
* periodic_exporting_metric_reader_test
And there were no checks in place to prevent things from getting worse.
Remove unnecessary exception checks in attributes_hashmap_test,
which simplifies the build and CI script.
Resolve symbol collision using anonymous namespaces.
---------
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
* add test to validate cardinaity limit
* format
* warning
* Format
* maint mode CI
* modify test to reproduce the issue
* Format
* remove vscode settings
* remove redundant test
* remove unused code
* fix to calculate hash on string_view
* remove iostream
* template specialization for const char *, and varous string type tests
* unused variable warning
* more warnings
* format
* fix use-after-stack-scope
* format
* another try
* format
---------
Co-authored-by: Tom Tan <Tom.Tan@microsoft.com>