Skip to content

Commit

Permalink
Merge main into metrics_new (#2250)
Browse files Browse the repository at this point in the history
* updating changelogs and version to 1.6.1-0.25b1 (#2223)

* default value is invalid, was renamed (#2226)

* Website: support GH page links to canonical src, and aliases (#2224)

* Fix opentracing shim references (#2180)

* Prepare release v1.6.2 and 0.25b2 (#2230)

* update changelog to note the rename of entrypoints in 1.6.0 (#2228)

* add note about proto version to README.rst (#2232)

* ReadableSpan events and links now return a tuple (#2215)

* ReadableSpan events and links now return a tuple

Removed MappingProxy since events and links are not mappings

Signed-off-by: Ted Kern <tkern@arnatious.com>

* fix lint

Signed-off-by: Ted Kern <tkern@arnatious.com>

* fix lint

* fix lint

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>

* adding CI testing for python 3.10 (#2207)

* remove `X-B3-ParentSpanId` for B3 propagator as per OpenTelemetry Specification (#2237)

* remove X-B3-ParentSpanId for B3 propagator as per OpenTelemetry specification

* revert changes - run tests

* re-commit changes

* add entry to CHANGELOG

* remove ParentSpanId in B3SingleFormat

* Remove lingering distro pkg files (#2241)

Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: alrex <aboten@lightstep.com>
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
Co-authored-by: Ben Roberts <robertsben@users.noreply.github.com>
Co-authored-by: Owais Lone <owais@users.noreply.github.com>
Co-authored-by: Ted Kern <tkern@arnatious.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: James <45812677+JamesJHPark@users.noreply.github.com>
Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <nathanielruiz98@gmail.com>
  • Loading branch information
10 people authored Oct 29, 2021
1 parent ef978ad commit aff87a7
Show file tree
Hide file tree
Showing 27 changed files with 55 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ jobs:
py37: 3.7
py38: 3.8
py39: 3.9
py310: "3.10"
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 ]
python-version: [ py36, py37, py38, py39, py310, pypy3 ]
package: ["api", "sdk", "semantic", "getting", "shim", "exporter", "protobuf", "propagator"]
os: [ ubuntu-20.04, windows-2019 ]
steps:
Expand Down
17 changes: 11 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.6.1-0.25b1...HEAD)

- Add support for Python 3.10
([#2207](https://github.com/open-telemetry/opentelemetry-python/pull/2207))
- remove `X-B3-ParentSpanId` for B3 propagator as per OpenTelemetry specification
([#2237](https://github.com/open-telemetry/opentelemetry-python/pull/2237))
- Return proxy instruments from ProxyMeter
([#2169](https://github.com/open-telemetry/opentelemetry-python/pull/2169))
- Make Measurement a concrete class
([#2153](https://github.com/open-telemetry/opentelemetry-python/pull/2153))
- Add metrics API
([#1887](https://github.com/open-telemetry/opentelemetry-python/pull/1887))

## [1.6.2-0.25b2](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.6.2-0.25b2) - 2021-10-19

## [1.6.1-0.25b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.6.1-0.25b1) - 2021-10-18
Expand All @@ -16,12 +27,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2201](https://github.com/open-telemetry/opentelemetry-python/pull/2201))
- Propagation: only warn about oversized baggage headers when headers exist
([#2212](https://github.com/open-telemetry/opentelemetry-python/pull/2212))
- Return proxy instruments from ProxyMeter
([#2169](https://github.com/open-telemetry/opentelemetry-python/pull/2169))
- Make Measurement a concrete class
([#2153](https://github.com/open-telemetry/opentelemetry-python/pull/2153))
- Add metrics API
([#1887](https://github.com/open-telemetry/opentelemetry-python/pull/1887))
- Fix parental trace relationship for opentracing `follows_from` reference
([#2180](https://github.com/open-telemetry/opentelemetry-python/pull/2180))

Expand Down
1 change: 1 addition & 0 deletions docs/examples/error_handler/error_handler_0/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
python_requires = >=3.6
Expand Down
1 change: 1 addition & 0 deletions docs/examples/error_handler/error_handler_1/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
python_requires = >=3.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-jaeger-thrift/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-jaeger/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-opencensus/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
python_requires = >=3.6
Expand Down
1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
python_requires = >=3.6
Expand Down
1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-otlp/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-zipkin-json/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions exporter/opentelemetry-exporter-zipkin/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-api/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-proto/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
python_requires = >=3.6
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-sdk/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-semantic-conventions/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
python_requires = >=3.6
Expand Down
1 change: 1 addition & 0 deletions propagator/opentelemetry-propagator-b3/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class B3MultiFormat(TextMapPropagator):
SINGLE_HEADER_KEY = "b3"
TRACE_ID_KEY = "x-b3-traceid"
SPAN_ID_KEY = "x-b3-spanid"
PARENT_SPAN_ID_KEY = "x-b3-parentspanid"
SAMPLED_KEY = "x-b3-sampled"
FLAGS_KEY = "x-b3-flags"
_SAMPLE_PROPAGATE_VALUES = set(["1", "True", "true", "d"])
Expand Down Expand Up @@ -149,21 +148,13 @@ def inject(
setter.set(
carrier, self.SPAN_ID_KEY, format_span_id(span_context.span_id)
)
span_parent = getattr(span, "parent", None)
if span_parent is not None:
setter.set(
carrier,
self.PARENT_SPAN_ID_KEY,
format_span_id(span_parent.span_id),
)
setter.set(carrier, self.SAMPLED_KEY, "1" if sampled else "0")

@property
def fields(self) -> typing.Set[str]:
return {
self.TRACE_ID_KEY,
self.SPAN_ID_KEY,
self.PARENT_SPAN_ID_KEY,
self.SAMPLED_KEY,
}

Expand Down Expand Up @@ -195,10 +186,6 @@ def inject(
"1" if sampled else "0",
]

span_parent = getattr(span, "parent", None)
if span_parent:
fields.append(format_span_id(span_parent.span_id))

setter.set(carrier, self.SINGLE_HEADER_KEY, "-".join(fields))

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_extract_single_header(benchmark):
benchmark(
FORMAT.extract,
{
FORMAT.SINGLE_HEADER_KEY: "bdb5b63237ed38aea578af665aa5aa60-c32d953d73ad2251-1-11fd79a30b0896cd285b396ae102dd76"
FORMAT.SINGLE_HEADER_KEY: "bdb5b63237ed38aea578af665aa5aa60-c32d953d73ad2251-1"
},
)

Expand All @@ -36,7 +36,6 @@ def test_inject_empty_context(benchmark):
{
FORMAT.TRACE_ID_KEY: "bdb5b63237ed38aea578af665aa5aa60",
FORMAT.SPAN_ID_KEY: "00000000000000000c32d953d73ad225",
FORMAT.PARENT_SPAN_ID_KEY: "11fd79a30b0896cd285b396ae102dd76",
FORMAT.SAMPLED_KEY: "1",
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ def setUpClass(cls):
cls.serialized_span_id = trace_api.format_span_id(
generator.generate_span_id()
)
cls.serialized_parent_id = trace_api.format_span_id(
generator.generate_span_id()
)

def setUp(self) -> None:
tracer_provider = trace.TracerProvider()
Expand Down Expand Up @@ -103,7 +100,6 @@ def test_extract_multi_header(self):
context = {
propagator.TRACE_ID_KEY: self.serialized_trace_id,
propagator.SPAN_ID_KEY: self.serialized_span_id,
propagator.PARENT_SPAN_ID_KEY: self.serialized_parent_id,
propagator.SAMPLED_KEY: "1",
}
child, parent, _ = self.get_child_parent_new_carrier(context)
Expand Down Expand Up @@ -142,7 +138,7 @@ def test_extract_single_header(self):

child, parent, _ = self.get_child_parent_new_carrier(
{
propagator.SINGLE_HEADER_KEY: f"{self.serialized_trace_id}-{self.serialized_span_id}-1-{self.serialized_parent_id}"
propagator.SINGLE_HEADER_KEY: f"{self.serialized_trace_id}-{self.serialized_span_id}-1"
}
)

Expand Down
1 change: 1 addition & 0 deletions propagator/opentelemetry-propagator-jaeger/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions shim/opentelemetry-opentracing-shim/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Typing :: Typed

[options]
Expand Down
1 change: 1 addition & 0 deletions tests/util/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
python_requires = >=3.6
Expand Down
38 changes: 19 additions & 19 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,58 @@ skip_missing_interpreters = True
envlist =
; Environments are organized by individual package, allowing
; for specifying supported Python versions per package.
py3{6,7,8,9}-opentelemetry-api
py3{6,7,8,9,10}-opentelemetry-api
pypy3-opentelemetry-api

py3{6,7,8,9}-opentelemetry-protobuf
py3{6,7,8,9,10}-opentelemetry-protobuf
pypy3-opentelemetry-protobuf

py3{6,7,8,9}-opentelemetry-sdk
py3{6,7,8,9,10}-opentelemetry-sdk
pypy3-opentelemetry-sdk

py3{6,7,8,9}-opentelemetry-semantic-conventions
py3{6,7,8,9,10}-opentelemetry-semantic-conventions
pypy3-opentelemetry-semantic-conventions

; docs/getting-started
py3{6,7,8,9}-opentelemetry-getting-started
py3{6,7,8,9,10}-opentelemetry-getting-started
pypy3-opentelemetry-getting-started

py3{6,7,8,9}-opentelemetry-opentracing-shim
py3{6,7,8,9,10}-opentelemetry-opentracing-shim
pypy3-opentelemetry-opentracing-shim

py3{6,7,8,9}-opentelemetry-exporter-jaeger-combined
py3{6,7,8,9,10}-opentelemetry-exporter-jaeger-combined

py3{6,7,8,9}-opentelemetry-exporter-jaeger-proto-grpc
py3{6,7,8,9,10}-opentelemetry-exporter-jaeger-proto-grpc

py3{6,7,8,9}-opentelemetry-exporter-jaeger-thrift
py3{6,7,8,9,10}-opentelemetry-exporter-jaeger-thrift

py3{6,7,8,9}-opentelemetry-exporter-opencensus
py3{6,7,8,9,10}-opentelemetry-exporter-opencensus
; exporter-opencensus intentionally excluded from pypy3

; opentelemetry-exporter-otlp
py3{6,7,8,9}-opentelemetry-exporter-otlp-combined
py3{6,7,8,9,10}-opentelemetry-exporter-otlp-combined
; intentionally excluded from pypy3

py3{6,7,8,9}-opentelemetry-exporter-otlp-proto-grpc
py3{6,7,8,9,10}-opentelemetry-exporter-otlp-proto-grpc
; intentionally excluded from pypy3

py3{6,7,8,9}-opentelemetry-exporter-otlp-proto-http
py3{6,7,8,9,10}-opentelemetry-exporter-otlp-proto-http
pypy3-opentelemetry-exporter-otlp-proto-http

; opentelemetry-exporter-zipkin
py3{6,7,8,9}-opentelemetry-exporter-zipkin-combined
py3{6,7,8,9,10}-opentelemetry-exporter-zipkin-combined
pypy3-opentelemetry-exporter-zipkin-combined

py3{6,7,8,9}-opentelemetry-exporter-zipkin-proto-http
py3{6,7,8,9,10}-opentelemetry-exporter-zipkin-proto-http
pypy3-opentelemetry-exporter-zipkin-proto-http

py3{6,7,8,9}-opentelemetry-exporter-zipkin-json
py3{6,7,8,9,10}-opentelemetry-exporter-zipkin-json
pypy3-opentelemetry-exporter-zipkin-json

py3{6,7,8,9}-opentelemetry-propagator-b3
py3{6,7,8,9,10}-opentelemetry-propagator-b3
pypy3-opentelemetry-propagator-b3

py3{6,7,8,9}-opentelemetry-propagator-jaeger
py3{6,7,8,9,10}-opentelemetry-propagator-jaeger
pypy3-opentelemetry-propagator-jaeger

lint
Expand Down Expand Up @@ -105,7 +105,7 @@ changedir =

commands_pre =
; Install without -e to test the actual installation
py3{6,7,8,9}: python -m pip install -U pip setuptools wheel
py3{6,7,8,9,10}: python -m pip install -U pip setuptools wheel
; Install common packages for all the tests. These are not needed in all the
; cases but it saves a lot of boilerplate in this file.
opentelemetry: pip install {toxinidir}/opentelemetry-api {toxinidir}/opentelemetry-semantic-conventions {toxinidir}/opentelemetry-sdk {toxinidir}/tests/util
Expand Down

0 comments on commit aff87a7

Please sign in to comment.