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

Adds metrics API #1887

Merged
merged 126 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
2d2e0ec
Adds metric prototype
ocelotl Jun 3, 2021
254651d
Fix docs
ocelotl Jul 5, 2021
1f4cc2d
Add API metrics doc
ocelotl Jul 6, 2021
bcd78a8
Add missing docs
ocelotl Jul 6, 2021
edfc7c7
Add files
ocelotl Jul 6, 2021
0879768
Adding docs
ocelotl Jul 6, 2021
3334978
Refactor to _initialize
ocelotl Jul 7, 2021
11a341b
Refactor initialize
ocelotl Jul 7, 2021
7dbcb59
Add more documentation
ocelotl Jul 8, 2021
be00f5b
Add exporter test
ocelotl Jul 11, 2021
71eb166
Add process
ocelotl Jul 11, 2021
46a898d
Fix tests
ocelotl Jul 12, 2021
c8b2446
Try to add aggregator_class argument
ocelotl Jul 12, 2021
afd3642
Fix instrument parent classes
ocelotl Jul 12, 2021
ed6f01f
Test default aggregator
ocelotl Jul 12, 2021
f0e942d
WIP
ocelotl Jul 12, 2021
451e1fa
Add prototype test
ocelotl Jul 28, 2021
432ea4a
Tests passing again
ocelotl Jul 30, 2021
053ef88
Use right counters
ocelotl Jul 30, 2021
aefc773
All tests passing
ocelotl Aug 1, 2021
d44c6d1
Rearrange instrument storage
ocelotl Aug 2, 2021
46b6b1e
Fix tests
ocelotl Aug 2, 2021
c027196
Add HTTP server test
ocelotl Aug 9, 2021
f462a36
WIP
ocelotl Aug 10, 2021
0f2a396
WIP
ocelotl Aug 11, 2021
12c1a77
Add prototype
ocelotl Aug 17, 2021
1c5a21e
WIP
ocelotl Aug 17, 2021
e301ca8
Fail the test
ocelotl Aug 17, 2021
7892fd8
WIP
ocelotl Aug 18, 2021
295cfad
WIP
ocelotl Aug 18, 2021
fe346bf
WIP
ocelotl Aug 18, 2021
403d74a
WIP
ocelotl Aug 18, 2021
3a84870
Add views
ocelotl Aug 18, 2021
081af80
Discard instruments via views
ocelotl Aug 18, 2021
6ac523c
Fix tests
ocelotl Aug 18, 2021
365be30
WIP
ocelotl Aug 19, 2021
78f377a
WIP
ocelotl Aug 19, 2021
2da3d35
Fix lint
ocelotl Aug 19, 2021
fee94b0
WIP
ocelotl Aug 19, 2021
61df024
Fix test
ocelotl Aug 19, 2021
70a588a
Fix lint
ocelotl Aug 19, 2021
8dd6e9f
Fix method
ocelotl Aug 19, 2021
2e497b3
Fix lint
ocelotl Aug 20, 2021
0c2556b
Mypy workaround
ocelotl Aug 20, 2021
c6b0f3c
Skip if 3.6
ocelotl Aug 20, 2021
b93a092
Fix lint
ocelotl Aug 20, 2021
67030cb
Add reason
ocelotl Aug 20, 2021
194fcec
Fix 3.6
ocelotl Aug 20, 2021
67dc825
Fix run
ocelotl Aug 20, 2021
759c519
Fix lint
ocelotl Aug 20, 2021
0963ca5
Remove SDK metrics
ocelotl Aug 20, 2021
7b6e05c
Remove SDK docs
ocelotl Aug 20, 2021
7d690e3
Remove metrics
ocelotl Aug 20, 2021
7cefbe3
Remove assertnotraises mixin
ocelotl Aug 20, 2021
3c33e0d
Revert sdk docs conf
ocelotl Aug 20, 2021
9f21078
Remove SDK env var changes
ocelotl Aug 20, 2021
ae02108
Fix unit checking
ocelotl Aug 24, 2021
d77a592
Define positional-only arguments
ocelotl Aug 31, 2021
0e1849f
Add Metrics plans
ocelotl Sep 9, 2021
a7a2553
Add API tests
ocelotl Sep 13, 2021
7a04479
WIP
ocelotl Sep 13, 2021
7dc32ef
WIP test
ocelotl Sep 14, 2021
6b1b31a
WIP
ocelotl Sep 14, 2021
21b39bc
WIP
ocelotl Sep 14, 2021
c3b22b4
WIP
ocelotl Sep 14, 2021
3a007d3
Set provider test passing
ocelotl Sep 14, 2021
0c90018
Use a fixture
ocelotl Sep 14, 2021
1bf3dba
Add test for get_provider
ocelotl Sep 14, 2021
a079fdf
Rename tests
ocelotl Sep 14, 2021
38e85c3
WIP
ocelotl Sep 14, 2021
107b647
WIP
ocelotl Sep 14, 2021
395fbf2
WIP
ocelotl Sep 14, 2021
6647f49
WIP
ocelotl Sep 14, 2021
47ac70b
Remove non specific requirement
ocelotl Sep 14, 2021
c81ad0f
Add meter requirements
ocelotl Sep 14, 2021
3f5b7d0
Put all meter provider tests in one file
ocelotl Sep 14, 2021
f929e86
Add meter tests
ocelotl Sep 14, 2021
79080ec
Make attributes be passed as a dictionary
ocelotl Sep 15, 2021
6cd4d08
Make some interfaces private
ocelotl Sep 15, 2021
b5736f0
Log an error instead
ocelotl Sep 15, 2021
6bf79ff
Remove ASCII flag
ocelotl Sep 15, 2021
6734f63
Add CHANGELOG entry
ocelotl Sep 15, 2021
6367380
Add instrument tests
ocelotl Sep 15, 2021
347ca01
All tests passing
ocelotl Sep 15, 2021
3e6d811
Add test
ocelotl Sep 15, 2021
080bc75
Add name tests
ocelotl Sep 15, 2021
3ddf907
Add unit tests
ocelotl Sep 15, 2021
a8afcec
Add description tests
ocelotl Sep 15, 2021
8d2aebc
Add counter tests
ocelotl Sep 15, 2021
62ebb88
Add more tests
ocelotl Sep 15, 2021
0b933bc
Add Histogram tests
ocelotl Sep 16, 2021
814f107
Add observable gauge tests
ocelotl Sep 16, 2021
290167b
Add updowncounter tests
ocelotl Sep 16, 2021
4130fde
Add observableupdowncounter tests
ocelotl Sep 16, 2021
be2c77a
Fix lint
ocelotl Sep 16, 2021
073fbfd
Fix docs
ocelotl Sep 16, 2021
a16f33a
Fix lint
ocelotl Sep 16, 2021
bf0b601
Ignore mypy
ocelotl Sep 16, 2021
8e8ee96
Remove useless pylint skip
ocelotl Sep 16, 2021
4ea81c6
Remove useless pylint skip
ocelotl Sep 16, 2021
62bd3f0
Remove useless pylint skip
ocelotl Sep 16, 2021
2c55296
Remove useless pylint skip
ocelotl Sep 16, 2021
cbe0c5d
Remove useless pylint skip
ocelotl Sep 16, 2021
3bc1a99
Add locks to meter and meterprovider
ocelotl Sep 16, 2021
5231582
Add lock to instruments
ocelotl Sep 16, 2021
063d7a1
Fix fixmes
ocelotl Sep 16, 2021
cb7de26
Fix lint
ocelotl Sep 16, 2021
c8a9773
Add documentation placeholder
ocelotl Sep 16, 2021
8c41f4d
Remove blank line as requested.
ocelotl Sep 17, 2021
4aaa7e4
Do not override Rlock
ocelotl Sep 17, 2021
8e2dc3a
Remove unecessary super calls
ocelotl Sep 17, 2021
6d4d4ea
Add missing super calls
ocelotl Sep 17, 2021
23e4d3b
Remove plan files
ocelotl Sep 17, 2021
5792a45
Add missing parameters
ocelotl Sep 17, 2021
243ec25
Rename observe to callback
ocelotl Sep 17, 2021
9732ca1
Fix lint
ocelotl Sep 17, 2021
87d46bd
Rename to secure_instrument_name
ocelotl Sep 18, 2021
830af79
Remove locks
ocelotl Sep 23, 2021
0e0ec52
Fix lint
ocelotl Sep 23, 2021
df3a836
Remove args and kwargs
ocelotl Sep 23, 2021
2f3f10e
Remove implementation that gives meters access to meter provider
ocelotl Sep 24, 2021
2d4aa2c
Allow creating async instruments with either a callback function or g…
aabmass Sep 21, 2021
e52c0e3
add additional test with callback form of observable counter
aabmass Sep 23, 2021
61b5bb7
add a test/example that reads measurements from proc stat
aabmass Sep 23, 2021
9ac4650
implement cpu time integration test with generator too
aabmass Sep 23, 2021
97b7d6d
Merge pull request #5 from aabmass/callbacks_and_generators
ocelotl Sep 24, 2021
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.5.0-0.24b0...HEAD)

- Add metrics API
([#1887](https://github.com/open-telemetry/opentelemetry-python/pull/1887))
- `opentelemetry-semantic-conventions` Update to semantic conventions v1.6.1
([#2077](https://github.com/open-telemetry/opentelemetry-python/pull/2077))
- Do not count invalid attributes for dropped
Expand Down
1 change: 1 addition & 0 deletions docs/api/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ OpenTelemetry Python API
baggage
context
trace
metrics
ocelotl marked this conversation as resolved.
Show resolved Hide resolved
environment_variables
8 changes: 8 additions & 0 deletions docs/api/metrics.instrument.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
opentelemetry.metrics.instrument
================================

.. automodule:: opentelemetry.metrics.instrument
:members:
:private-members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/metrics.measurement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
opentelemetry.metrics.measurement
=================================

.. automodule:: opentelemetry.metrics.measurement
:members:
:undoc-members:
:show-inheritance:
15 changes: 15 additions & 0 deletions docs/api/metrics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
opentelemetry.metrics package
=============================

Submodules
----------

.. toctree::

metrics.instrument
metrics.measurement

Module contents
---------------

.. automodule:: opentelemetry.metrics
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@
"""
.. envvar:: OTEL_PYTHON_TRACER_PROVIDER
"""

OTEL_PYTHON_METER_PROVIDER = "OTEL_PYTHON_METER_PROVIDER"
"""
.. envvar:: OTEL_PYTHON_METER_PROVIDER
"""

OTEL_METRICS_EXPORTER = "OTEL_METRICS_EXPORTER"
"""
.. envvar:: OTEL_METRICS_EXPORTER

"""
Loading