Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exemplars feature #4094

Merged
merged 51 commits into from
Sep 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9935e63
Add based classes
fcollonval Jul 30, 2024
5aa8353
Add exemplar to datapoint
fcollonval Jul 31, 2024
ceba9f1
Merge branch 'main' into ft/exemplars
lzchen Jul 31, 2024
d699f8d
Add time to Measurement
fcollonval Aug 11, 2024
3b1e40d
Add context to measurements
fcollonval Aug 11, 2024
05ebc34
First propagation of filter and reservoir factory
fcollonval Aug 12, 2024
6f74b3c
Reduce autoformat noise
fcollonval Aug 13, 2024
5fc775b
Fixing existing test - part 1
fcollonval Aug 13, 2024
80f040d
Lint the code
fcollonval Aug 13, 2024
19b2db4
Fix code and unit tests
fcollonval Aug 14, 2024
2b7793a
Add optional context args in Instrument.record/add/set
fcollonval Aug 14, 2024
6a25608
Add first test focusing on exemplar
fcollonval Aug 14, 2024
22cebeb
Add trivial test for exemplar filters
fcollonval Aug 14, 2024
f0ecace
Lint the code
fcollonval Aug 14, 2024
fadcefc
add unit tests for exemplarfilter, exemplarreservoir, and reservoirfa…
czhang771 Aug 16, 2024
70f8bef
add unit and integration tests
czhang771 Aug 23, 2024
351730c
update otlp exporter to export exemplars
czhang771 Aug 27, 2024
afd4e2c
address basic PR comments
czhang771 Aug 29, 2024
eece48d
add samples for exemplar filter and custom reservoir factory
czhang771 Aug 29, 2024
bfaec2d
clean up documentation on exemplar reservoir
czhang771 Aug 30, 2024
68e8824
refactor aggregate method and fix bucket index
czhang771 Aug 30, 2024
ed02f8b
refactored FixedSizeExemplarReservoirABC
czhang771 Aug 30, 2024
4f5efa7
Apply suggestions from review
fcollonval Sep 2, 2024
682a176
Lint the code
fcollonval Sep 2, 2024
0a13b62
Fix unit tests
fcollonval Sep 2, 2024
612404e
Improve the example
fcollonval Sep 2, 2024
e8aa164
Merge branch 'main' into ft/exemplars
fcollonval Sep 2, 2024
c29e0dd
Fix pylint errors
fcollonval Sep 3, 2024
1309b61
Add changelog entry
fcollonval Sep 3, 2024
2780df7
Fix opentelemetry-api tests
fcollonval Sep 3, 2024
0ea80dc
Fix TypeAlias non-supported with py38 and py39
fcollonval Sep 3, 2024
e7e4227
add exemplar filter as environment variable
czhang771 Sep 3, 2024
028e414
Fix format
fcollonval Sep 4, 2024
74016f0
Lint the latest version
fcollonval Sep 4, 2024
dcb44f0
More typing fixes for py38 and py39
fcollonval Sep 4, 2024
c0787ab
Fix log record tests
fcollonval Sep 4, 2024
e2b7778
Fix doc
fcollonval Sep 4, 2024
04a21e0
More linting
fcollonval Sep 4, 2024
975700a
Fix PyPy json loads
fcollonval Sep 4, 2024
5b32ffc
Fix sphinx doc generation
fcollonval Sep 4, 2024
f6f6233
Merge branch 'main' into ft/exemplars
fcollonval Sep 4, 2024
ecd03bc
fix view instrument match test case
czhang771 Sep 4, 2024
77d109e
Merge branch 'main' into ft/exemplars
fcollonval Sep 5, 2024
e3fe1cb
Make `encode_exemplars` protected
fcollonval Sep 5, 2024
627da87
Add some prose to the doc
fcollonval Sep 5, 2024
8559504
Add test for filtered attributes through View
fcollonval Sep 5, 2024
b5734f5
Lint the code
fcollonval Sep 5, 2024
592270a
Merge branch 'main' into ft/exemplars
lzchen Sep 5, 2024
e6c1d01
Fix pylint
fcollonval Sep 6, 2024
b1355f3
Merge branch 'main' into ft/exemplars
xrmx Sep 11, 2024
22a2875
Merge branch 'main' into ft/exemplars
lzchen Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing existing test - part 1
fcollonval committed Aug 13, 2024

Verified

This commit was signed with the committer’s verified signature.
fcollonval Frédéric Collonval
commit 5fc775ba134af7f48a075911d8376d7d0bccdd39
Original file line number Diff line number Diff line change
@@ -52,12 +52,14 @@ def __init__(
)
if not isinstance(self._view._aggregation, DefaultAggregation):
self._aggregation = self._view._aggregation._create_aggregation(
self._instrument, None, 0
self._instrument, None, self._view._exemplar_reservoir_factory, 0
)
else:
self._aggregation = self._instrument_class_aggregation[
self._instrument.__class__
]._create_aggregation(self._instrument, None, 0)
]._create_aggregation(
self._instrument, None, self._view._exemplar_reservoir_factory, 0
)

def conflicts(self, other: "_ViewInstrumentMatch") -> bool:
# pylint: disable=protected-access
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
_logger = getLogger(__name__)


def _default_reservoir_factory(aggregationType: Type[_Aggregation]) -> ExemplarReservoirFactory:
def default_reservoir_factory(aggregationType: Type[_Aggregation]) -> ExemplarReservoirFactory:
"""Default reservoir factory per aggregation."""
if issubclass(aggregationType, _ExplicitBucketHistogramAggregation):
fcollonval marked this conversation as resolved.
Show resolved Hide resolved
return AlignedHistogramBucketExemplarReservoir
@@ -154,7 +154,7 @@ def __init__(
self._description = description
self._attribute_keys = attribute_keys
self._aggregation = aggregation or self._default_aggregation
self._exemplar_reservoir_factory = exemplar_reservoir_factory or _default_reservoir_factory
self._exemplar_reservoir_factory = exemplar_reservoir_factory or default_reservoir_factory

# pylint: disable=too-many-return-statements
# pylint: disable=too-many-branches
Loading