Skip to content

Commit

Permalink
Merge main into logs (#2107)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen authored Sep 13, 2021
1 parent d0dbc0b commit 2ad1ef8
Show file tree
Hide file tree
Showing 68 changed files with 842 additions and 486 deletions.
45 changes: 31 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
# Otherwise, set variable to the commit of your branch on
# opentelemetry-python-contrib which is compatible with these Core repo
# changes.
CONTRIB_REPO_SHA: dd65a29b5805397e3b511d6546179e7c03442f82
CONTRIB_REPO_SHA: dde62cebffe519c35875af6d06fae053b3be65ec

jobs:
build:
Expand All @@ -20,15 +20,15 @@ jobs:
py37: 3.7
py38: 3.8
py39: 3.9
pypy3: pypy3
pypy3: pypy-3.7
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: [ py36, py37, py38, py39, pypy3 ]
package: ["instrumentation", "core", "exporter", "propagator"]
os: [ ubuntu-latest ]
os: [ ubuntu-20.04, windows-2019 ]
steps:
- name: Checkout Core Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v2
Expand All @@ -42,14 +42,22 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ env[matrix.python-version] }}
architecture: 'x64'
- name: Install tox
run: pip install -U tox-factor
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v2
with:
path: .tox
key: tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
path: |
.tox
~/.cache/pip
key: v2-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
# tox fails on windows and Python3.6 when tox dir is reused between builds so we remove it
- name: fix for windows + py3.6
if: ${{ matrix.os == 'windows-2019' && matrix.python-version == 'py36' }}
shell: pwsh
run: Remove-Item .\.tox\ -Force -Recurse -ErrorAction Ignore
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
- name: Find and merge benchmarks
Expand Down Expand Up @@ -81,7 +89,7 @@ jobs:
matrix:
tox-environment: [ "docker-tests", "lint", "docs", "mypy", "mypyinstalled", "tracecontext" ]
name: ${{ matrix.tox-environment }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout Core Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v2
Expand All @@ -95,14 +103,17 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: 'x64'
- name: Install tox
run: pip install -U tox
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v2
with:
path: .tox
key: tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
path: |
.tox
~/.cache/pip
key: v2-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core
- name: run tox
run: tox -e ${{ matrix.tox-environment }}
contrib-build:
Expand All @@ -119,7 +130,7 @@ jobs:
matrix:
python-version: [ py36, py37, py38, py39, pypy3 ]
package: ["instrumentation", "exporter"]
os: [ ubuntu-latest ]
os: [ ubuntu-20.04]
steps:
- name: Checkout Contrib Repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
uses: actions/checkout@v2
Expand All @@ -135,14 +146,17 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ env[matrix.python-version] }}
architecture: 'x64'
- name: Install tox
run: pip install -U tox-factor
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v2
with:
path: .tox
key: tox-cache-${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
path: |
.tox
~/.cache/pip
key: v2-tox-cache-${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }}
contrib-misc:
Expand All @@ -151,7 +165,7 @@ jobs:
matrix:
tox-environment: [ "docker-tests"]
name: ${{ matrix.tox-environment }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout Contrib Repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
uses: actions/checkout@v2
Expand All @@ -167,13 +181,16 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: 'x64'
- name: Install tox
run: pip install -U tox
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v2
with:
path: .tox
key: tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
path: |
.tox
~/.cache/pip
key: v2-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib
- name: run tox
run: tox -e ${{ matrix.tox-environment }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build
eggs
parts
bin
include
var
sdist
develop-eggs
Expand Down
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

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

- `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
([#2096](https://github.com/open-telemetry/opentelemetry-python/pull/2096))
- Fix propagation bug caused by counting skipped entries
([#2071](https://github.com/open-telemetry/opentelemetry-python/pull/2071))

## [1.5.0-0.24b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.5.0-0.24b0) - 2021-08-26


- Add pre and post instrumentation entry points
([#1983](https://github.com/open-telemetry/opentelemetry-python/pull/1983))
- Fix documentation on well known exporters and variable OTEL_TRACES_EXPORTER which were misnamed
([#2023](https://github.com/open-telemetry/opentelemetry-python/pull/2023))
- `opentelemetry-sdk` `get_aggregated_resource()` returns default resource and service name
Expand All @@ -14,6 +27,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
to let distros use its default implementation
([#1937](https://github.com/open-telemetry/opentelemetry-python/pull/1937))
- Add Trace ID validation to meet [TraceID spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#spancontext) ([#1992](https://github.com/open-telemetry/opentelemetry-python/pull/1992))
- Fixed Python 3.10 incompatibility in `opentelemetry-opentracing-shim` tests
([#2018](https://github.com/open-telemetry/opentelemetry-python/pull/2018))
- `opentelemetry-sdk` added support for `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT`
([#2044](https://github.com/open-telemetry/opentelemetry-python/pull/2044))
- `opentelemetry-sdk` Fixed bugs (#2041, #2042 & #2045) in Span Limits
([#2044](https://github.com/open-telemetry/opentelemetry-python/pull/2044))
- `opentelemetry-sdk` Add support for `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT` env var
([#2056](https://github.com/open-telemetry/opentelemetry-python/pull/2056))
- `opentelemetry-sdk` Treat limit even vars set to empty values as unset/unlimited.
([#2054](https://github.com/open-telemetry/opentelemetry-python/pull/2054))
- `opentelemetry-api` Attribute keys must be non-empty strings.
([#2057](https://github.com/open-telemetry/opentelemetry-python/pull/2057))

## [0.23.1](https://github.com/open-telemetry/opentelemetry-python/pull/1987) - 2021-07-26

Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pylint==2.7.1
flake8~=3.7
isort~=5.8
black~=20.8b1
black~=21.7b0
httpretty~=1.0
mypy==0.812
sphinx~=3.5.4
Expand Down
1 change: 1 addition & 0 deletions docs/examples/auto-instrumentation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ commands that help automatically instruments a program.
$ pip install opentelemetry-sdk
$ pip install opentelemetry-instrumentation
$ pip install opentelemetry-instrumentation-flask
$ pip install flask
$ pip install requests
Execute
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Getting Started with OpenTelemetry Python
=========================================
Getting Started
===============

This guide walks you through instrumenting a Python application with ``opentelemetry-python``.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/flask_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ def hello():
return "hello"


app.run(debug=True, port=5000)
app.run(port=5000)
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ The Python `OpenTelemetry <https://opentelemetry.io/>`_ client.
This documentation describes the :doc:`opentelemetry-api <api/api>`,
:doc:`opentelemetry-sdk <sdk/sdk>`, and several `integration packages <#integrations>`_.

**Please note** that this library is currently in _beta_, and shouldn't
generally be used in production environments.
The library is currently stable for tracing. Support for `metrics <https://github.com/open-telemetry/opentelemetry-python/tree/metrics>`_
and `logging <https://github.com/open-telemetry/opentelemetry-python/tree/logs>`_ is currently under development and is considered
experimental.

Requirement
-----------
Expand Down
4 changes: 2 additions & 2 deletions eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sortfirst=
exporter/*

[stable]
version=1.5.0.dev0
version=1.5.0

packages=
opentelemetry-sdk
Expand All @@ -33,7 +33,7 @@ packages=
opentelemetry-api

[prerelease]
version=0.24.dev0
version=0.24b0

packages=
opentelemetry-opentracing-shim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-jaeger/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ python_requires = >=3.6

packages=find_namespace:
install_requires =
opentelemetry-exporter-jaeger-proto-grpc == 1.5.0.dev0
opentelemetry-exporter-jaeger-thrift == 1.5.0.dev0
opentelemetry-exporter-jaeger-proto-grpc == 1.5.0
opentelemetry-exporter-jaeger-thrift == 1.5.0

[options.extras_require]
test =
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# pylint:disable=no-member
class TestJaegerExporter(unittest.TestCase):
def test_constructors(self):
""" Test ensures both exporters can co-exist"""
"""Test ensures both exporters can co-exist"""
try:
grpc.JaegerExporter()
thrift.JaegerExporter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.24.dev0"
__version__ = "0.24b0"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install_requires =
googleapis-common-protos ~= 1.52
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.3
opentelemetry-proto == 1.5.0.dev0
opentelemetry-proto == 1.5.0
backoff ~= 1.10.0

[options.extras_require]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install_requires =
googleapis-common-protos ~= 1.52
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.3
opentelemetry-proto == 1.5.0.dev0
opentelemetry-proto == 1.5.0
backoff ~= 1.10.0

[options.extras_require]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.24.dev0"
__version__ = "1.5.0"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-otlp/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ classifiers =
python_requires = >=3.6
packages=find_namespace:
install_requires =
opentelemetry-exporter-otlp-proto-grpc == 1.5.0.dev0
opentelemetry-exporter-otlp-proto-grpc == 1.5.0
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install_requires =
requests ~= 2.7
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.3
opentelemetry-exporter-zipkin-json == 1.5.0.dev0
opentelemetry-exporter-zipkin-json == 1.5.0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
4 changes: 2 additions & 2 deletions exporter/opentelemetry-exporter-zipkin/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ classifiers =
python_requires = >=3.6
packages=find_namespace:
install_requires =
opentelemetry-exporter-zipkin-json == 1.5.0.dev0
opentelemetry-exporter-zipkin-proto-http == 1.5.0.dev0
opentelemetry-exporter-zipkin-json == 1.5.0
opentelemetry-exporter-zipkin-proto-http == 1.5.0

[options.extras_require]
test =
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev0"
__version__ = "1.5.0"
Loading

0 comments on commit 2ad1ef8

Please sign in to comment.