Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pull] main from open-telemetry:main #101

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

Open
wants to merge 824 commits into
base: main
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 17, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Dec 17, 2021
emdneto and others added 29 commits June 10, 2024 09:05
* first draft of issue forms

* texts in long lines and split description form

* fix yaml

* add os to environment section

* remove some fields from bug report

* add sdk and api version as example

---------

Co-authored-by: Leighton Chen <[email protected]>
…#3938)

* sdk: make test_batch_span_processor_scheduled_delay a bit more robust

It happened that tests failed because the delay was fired some
microseconds earlier:

>       self.assertGreaterEqual((export_time - start_time) * 1e3, 500)
E       AssertionError: 499.9737739562988 not greater than or equal to 500

Use assertAlmostEqual to accept a similar enough value (delta=25) and
avoid too big values.

Skip tests on windows pypy because of random huge spikes:

E AssertionError: 2253.103017807007 != 500 within 25 delta (1744.1030178070068 difference)

Fix #3911

* opentelemetry-sdk: handle timeout exception in last metric collection

The last metric collection after the thread has been notified to
shutdown is not handling the submission to get a MetricsTimeoutError
exception. Handle that to match what we are doing in the usual loop
collection.

See in TestBatchSpanProcessor.test_batch_span_processor_scheduled_delay
failing with:

opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py::TestPeriodicExportingMetricReader::test_metric_timeout_does_not_kill_worker_thread
  \_pytest\threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread OtelPeriodicExportingMetricReader

  Traceback (most recent call last):
    File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\threading.py", line 1045, in _bootstrap_inner
      self.run()
    File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\threading.py", line 982, in run
      self._target(*self._args, **self._kwargs)
    File "D:\a\opentelemetry-python\opentelemetry-python\opentelemetry-sdk\src\opentelemetry\sdk\metrics\_internal\export\__init__.py", line 522, in _ticker
      self.collect(timeout_millis=self._export_interval_millis)
    File "D:\a\opentelemetry-python\opentelemetry-python\opentelemetry-sdk\tests\metrics\test_periodic_exporting_metric_reader.py", line 87, in collect
      raise self._collect_exception
  opentelemetry.sdk.metrics._internal.exceptions.MetricsTimeoutError: test timeout

---------

Co-authored-by: Diego Hurtado <[email protected]>
* fix _encode_events assuming events.attributes.dropped exists

* test

* restore

* test

* restore

* added unit test

* changelog update

---------

Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Diego Hurtado <[email protected]>
Co-authored-by: Tammy Baylis <[email protected]>
Co-authored-by: Diego Hurtado <[email protected]>
* Do not run benchmark tests in CI

Fixes #4018

* Skip benchmarks
xrmx and others added 30 commits May 7, 2025 07:16
* Bump semantic conventions to 1.33.0

* Add CHANGELOG
…atchLogRecordProcessor can use (#4562)

* Refactor BatchLogRecordProcessor

* Respond to comments

* Fix lint

* Add delay for windows test.

* Fix fork test

* Initial Commit

* Another commit

* Fix lint / precommit

* Revert some old changes

* Fix lint issues

* Fix typo

* Fix lint and spellcheck

* Update test to use BatchLogRecordProcessor instead of BatchProcessor

* Add a sleep to see if it helps this test pass on pypy 3.8

* fix lint and precommit

* Add sleep to try to fix test..

* Fix flaky test attempt #2

* Fix test again..

* Fix test again

* Try again

* Fix again..

* Reintroduce weakref, I accidentlly undid that change in my last PR

* Add changelog

* Respond to comments on PR

* Make BatchProcessor a member of BLRP instead of having BLRP subclass it

* Run precommit

* Use a generic Protocol for the Exporter

* Minor change

* Fix bad changelog mearge

* Respond to comments..

---------

Co-authored-by: Leighton Chen <[email protected]>
* Fix max recursion bug by removing logging.log calls in emit

* Update opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py

Co-authored-by: Emídio Neto <[email protected]>

* Add changelog

* Fix linter

* Respond to comments in PR

* Remove log line

* Fix lint issues

* Attach handler to SDK logger instead of root logger and remote it after test is done. Fix lint issues..

* Assert no logs emitted. ADd try/except block for cleanup

* Skip test on <python3.10

* Run precommit

* Apply suggestions from code review

* use try/finally instead of try/except

---------

Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Aaron Abbott <[email protected]>
* opentelemetry-api: allow importlib-metadata 8.7.0

* Add CHANGELOG
…ram metrics (#4595)

* opentelemetry-test-utils: assert explicit bucket boundaries in histogram metrics

* Add changelog
)

Bumps the github-actions group with 1 update: [fossas/fossa-action](https://github.com/fossas/fossa-action).


Updates `fossas/fossa-action` from 1.6.0 to 1.7.0
- [Release notes](https://github.com/fossas/fossa-action/releases)
- [Commits](fossas/fossa-action@c0a7d01...3ebcea1)

---
updated-dependencies:
- dependency-name: fossas/fossa-action
  dependency-version: 1.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update `BatchSpanProcessor` to use new `BatchProcessor` class

* Update changelog

* fork does not exist on windows.

* Update force_flush to return a bool. Currently force_flush ignores it's timeout which is bad, but the behavior before made even less sense..

* Fix changelog

* Add backtic's around BatchProcessor

* Require export get called by position only

* Add comment that there are additional tests for the BatchSpan/LogProcessor in the shared_internal directory.

* Empty commit to bump

* Fix broken test

---------

Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Aaron Abbott <[email protected]>
* update format_*_id docstrings

* Apply suggestions from code review

Co-authored-by: Emídio Neto <[email protected]>

---------

Co-authored-by: Riccardo Magliocchetti <[email protected]>
Co-authored-by: Emídio Neto <[email protected]>
* Chore: Drop support for Python 3.8

Python 3.8 was EoL @ 2024-10-07, our 6 month promise for support ended on 2024-04-07.
This PR removes all unnecessary references and modifies the baseline references to 3.9.

* Update CHANGELOG.md

---------

Co-authored-by: Riccardo Magliocchetti <[email protected]>
…ts shutdown the batch exporter. (#4600)

* Initital commit to imporve shutdown behavior.

* Remove print statements and changes from shutdown branch

* Remove unused imports/deps

* fix lint issue

---------

Co-authored-by: Riccardo Magliocchetti <[email protected]>
* Add span exporter property to batch span processor

* Add test

* Add changelog

* Update CHANGELOG.md

---------

Co-authored-by: Riccardo Magliocchetti <[email protected]>
* fix console log exporter

* Fix console exporter

* Add changelog

* Remove BytesEncoder import
* Update license field in pyproject.toml to use latest format

* add changelog entry

---------

Co-authored-by: Riccardo Magliocchetti <[email protected]>
…koffs, cleanup code a bit (#4564)

* Initial commit to add timeout as a parm to export, make retries encompass timeout

* Fix lint issues

* Fix a bunch of failing style/lint/spellcheck checks

* Remove timeout param from the export calls.

* Fix flaky windows test ?

* Respond to review comments..

* Delete exponential backoff code that is now unused

* Add changelog and remove some unused imports..

* fix typo and unit test flaking on windows

* Refactor tests, HTTP exporters a bit

* Remove unneeded test reqs

* Remove gRPC retry config

* Tweak backoff calculation

* Lint and precommit

* Empty commit

* Another empty commit

* Calculate backoff in 1 place instead of 2

* Update changelog

* Update changelog

* Make new _common directory in the http exporter for shared code

* precommit

* Respond to comments on PR

* Fix broken test, execute precommit

* Skip some tests on windows

* Explain why test is skipped

* Update exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py

Co-authored-by: Emídio Neto <[email protected]>

* Revert change to start respecting timeout passed into metric exporter

---------

Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>
…4608)

Bumps the github-actions group with 1 update: [ossf/scorecard-action](https://github.com/ossf/scorecard-action).


Updates `ossf/scorecard-action` from 2.4.1 to 2.4.2
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](ossf/scorecard-action@f49aabe...05b42c6)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nt; deprecates trace_id, span_id, trace_flags (#4597)

* Logs API/SDK accepts additional otel context

* Changelog

* LoggingHandler translates to LogRecord with current Otel context

* Add LogRecord init priority for context's span over old span info

* Add LogRecord serialized_context for to_json of arbitrary objects

* Add test coverage

* Changelog

* lint

* Fix tests

* Changelog

* Rm Context inclusion from to_json of LogRecord

* Revision: logs SDK does get_current, overload init and deprecate trace_id etc

* Simplify test

* Changelog

* Use typing_extensions deprecated, not custom

* Update LogRecord API; simplify test

* Force logrecord api kwarg-only to avoid param order issues

* Add special LogDeprecatedInitWarning that logs once

* Rm deprecated decorator

* api too

* catch_warnings instead of assertLogs in test

* changelog

* Rm with assertLogs for py3.13 ubuntu test

---------

Co-authored-by: Emídio Neto <[email protected]>
* Update logger level to NOTSET in logs example

* Add changelog

---------

Co-authored-by: Riccardo Magliocchetti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.