Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…y-python into logs
  • Loading branch information
lzchen committed Aug 16, 2021
2 parents fce09e6 + 3cdb54f commit b31790a
Show file tree
Hide file tree
Showing 106 changed files with 4,296 additions and 396 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[flake8]
ignore =
E501 # line too long, defer to black
F401 # unused import, defer to pylint
W503 # allow line breaks before binary ops
W504 # allow line breaks after binary ops
E203 # allow whitespace before ':' (https://github.com/psf/black#slices)
Expand Down
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi

Answer the following question based on these examples of changes that would require a Contrib Repo Change:
- [The OTel specification](https://github.com/open-telemetry/opentelemetry-specification) has changed which prompted this PR to update the method interfaces of `opentelemetry-api/` or `opentelemetry-sdk/`
- The method interfaces of `opentelemetry-instrumentation/` have changed
- The method interfaces of `test/util` have changed
- Scripts in `scripts/` that were copied over to the Contrib repo have changed
- Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish

on:
release:
types: [created]
types: [published]

jobs:
publish:
Expand Down
2 changes: 1 addition & 1 deletion .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: 7fb531db05a1e9fda5af684be666133b05f20ba9
CONTRIB_REPO_SHA: dd65a29b5805397e3b511d6546179e7c03442f82

jobs:
build:
Expand Down
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,34 @@ 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.3.0-0.22b0...HEAD)
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.4.0-0.23b0...HEAD)
- 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
whenever called
([#2013](https://github.com/open-telemetry/opentelemetry-python/pull/2013))
- `opentelemetry-distro` & `opentelemetry-sdk` Moved Auto Instrumentation Configurator code to SDK
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))

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

### Changed
- Fix opentelemetry-bootstrap dependency script.
([#1987](https://github.com/open-telemetry/opentelemetry-python/pull/1987))

## [1.4.0-0.23b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.4.0-0.23b0) - 2021-07-21

### Added
- Moved `opentelemetry-instrumentation` to core repository.
([#1959](https://github.com/open-telemetry/opentelemetry-python/pull/1959))
- Add support for OTLP Exporter Protobuf over HTTP
([#1868](https://github.com/open-telemetry/opentelemetry-python/pull/1868))
- Dropped attributes/events/links count available exposed on ReadableSpans.
([#1893](https://github.com/open-telemetry/opentelemetry-python/pull/1893))
- Added dropped count to otlp, jaeger and zipkin exporters.
([#1893](https://github.com/open-telemetry/opentelemetry-python/pull/1893))

### Added
- Add global LogEmitterProvider and convenience function get_log_emitter
Expand Down Expand Up @@ -35,6 +62,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updating dependency for opentelemetry api/sdk packages to support major version instead of
pinning to specific versions.
([#1933](https://github.com/open-telemetry/opentelemetry-python/pull/1933))
- `opentelemetry-semantic-conventions` Generate semconv constants update for OTel Spec 1.5.0
([#1946](https://github.com/open-telemetry/opentelemetry-python/pull/1946))

### Fixed
- Updated `opentelementry-opentracing-shim` `ScopeShim` to report exceptions in
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,17 @@ Meeting notes are available as a public [Google doc](https://docs.google.com/doc
Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telemetry/teams/python-approvers)):

- [Aaron Abbott](https://github.com/aabmass), Google
- [Diego Hurtado](https://github.com/ocelotl), Lightstep
- [Owais Lone](https://github.com/owais), Splunk
- [Alex Boten](https://github.com/codeboten), Lightstep
- [Srikanth Chekuri](https://github.com/lonewolf3739)
- [Nathaniel Ruiz Nowell](https://github.com/NathanielRN), AWS

*For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).*

Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-telemetry/teams/python-maintainers)):

- [Alex Boten](https://github.com/codeboten), Lightstep
- [Diego Hurtado](https://github.com/ocelotl), Lightstep
- [Leighton Chen](https://github.com/lzchen), Microsoft
- [Owais Lone](https://github.com/owais), Splunk

*For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).*

Expand Down
3 changes: 2 additions & 1 deletion docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ sphinx-jekyll-builder
# doesn't work for pkg_resources.
./opentelemetry-api
./opentelemetry-semantic-conventions
./opentelemetry-python-contrib/opentelemetry-instrumentation
./opentelemetry-instrumentation
./opentelemetry-sdk
./opentelemetry-instrumentation

# Required by instrumentation and exporter packages
ddtrace>=0.34.0
Expand Down
7 changes: 6 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@

settings.configure()


source_dirs = [
os.path.abspath("../opentelemetry-instrumentation/src/"),
]

exp = "../exporter"
exp_dirs = [
os.path.abspath("/".join(["../exporter", f, "src"]))
Expand All @@ -37,7 +42,7 @@
if isdir(join(shim, f))
]

sys.path[:0] = exp_dirs + shim_dirs
sys.path[:0] = source_dirs + exp_dirs + shim_dirs

# -- Project information -----------------------------------------------------

Expand Down
15 changes: 6 additions & 9 deletions docs/examples/django/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ Instrumentation package.
Disabling Django Instrumentation
--------------------------------

Django's instrumentation can be disabled by setting the following environment variable.
Django's instrumentation can be disabled by setting the following environment variable:

#. ``export OTEL_PYTHON_DJANGO_INSTRUMENT=False``
``export OTEL_PYTHON_DJANGO_INSTRUMENT=False``

Auto Instrumentation
--------------------

This same example can be run using auto instrumentation. Comment out the call
to ``DjangoInstrumento().instrument()`` in ``main``, then Run the django app
with ``opentelemetry-instrumentation python manage.py runserver --noreload``.
with ``opentelemetry-instrument python manage.py runserver --noreload``.
Repeat the steps with the client, the result should be the same.

Usage with Auto Instrumentation and uWSGI
Expand All @@ -123,15 +123,12 @@ Usage with Auto Instrumentation and uWSGI
uWSGI and Django can be used together with auto instrumentation. To do so,
first install uWSGI in the previous virtual environment:

```
pip install uwsgi
```
``pip install uwsgi``

Once that is done, run the server with ``uwsgi`` from the directory that
contains ``instrumentation_example``:

```
opentelemetry-instrument uwsgi --http :8000 --module instrumentation_example.wsgi
```
``opentelemetry-instrument uwsgi --http :8000 --module instrumentation_example.wsgi``

This should start one uWSGI worker in your console. Open up a browser and point
it to ``localhost:8000``. This request should display a span exported in the
Expand Down
1 change: 0 additions & 1 deletion docs/getting_started/otlpcollector_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

# otcollector.py
import time

from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
Expand Down
7 changes: 5 additions & 2 deletions eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ ignore=
sortfirst=
opentelemetry-api
opentelemetry-sdk
opentelemetry-instrumentation
opentelemetry-proto
opentelemetry-distro
tests/util
exporter/*

[stable]
version=1.4.0.dev0
version=1.5.0.dev0

packages=
opentelemetry-sdk
Expand All @@ -24,14 +25,15 @@ packages=
opentelemetry-exporter-zipkin-json
opentelemetry-exporter-zipkin
opentelemetry-exporter-otlp-proto-grpc
opentelemetry-exporter-otlp-proto-http
opentelemetry-exporter-otlp
opentelemetry-exporter-jaeger-thrift
opentelemetry-exporter-jaeger-proto-grpc
opentelemetry-exporter-jaeger
opentelemetry-api

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

packages=
opentelemetry-opentracing-shim
Expand All @@ -51,6 +53,7 @@ packages=
opentelemetry-api
opentelemetry-sdk
opentelemetry-exporter-otlp-proto-grpc
opentelemetry-exporter-otlp-proto-http
opentelemetry-exporter-otlp

[lintroots]
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.4.0.dev0"
__version__ = "1.5.0.dev0"
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@
from opentelemetry import trace
from opentelemetry.exporter.jaeger.thrift import JaegerExporter
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
trace.set_tracer_provider(TracerProvider())
trace.set_tracer_provider(
TracerProvider(
resource=Resource.create({SERVICE_NAME: "my-helloworld-service"})
)
)
tracer = trace.get_tracer(__name__)
# create a JaegerExporter
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.4.0.dev0"
__version__ = "1.5.0.dev0"
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,15 @@ def setUp(self):
is_remote=False,
)

self._test_span = trace._Span("test_span", context=self.context)
self._test_span.start()
self._test_span.end()
self._test_span = trace._Span(
"test_span",
context=self.context,
# Use a fixed version because a longer/shorter version number
# might break tests that care about packet size.
resource=Resource.create({"telemetry.sdk.version": "0.0.0.dev0"}),
)
self._test_span.start(start_time=1)
self._test_span.end(end_time=3)
# pylint: disable=protected-access

@patch("opentelemetry.exporter.jaeger.thrift.trace._TRACER_PROVIDER", None)
Expand Down
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.4.0.dev0
opentelemetry-exporter-jaeger-thrift == 1.4.0.dev0
opentelemetry-exporter-jaeger-proto-grpc == 1.5.0.dev0
opentelemetry-exporter-jaeger-thrift == 1.5.0.dev0

[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.4.0.dev0"
__version__ = "1.5.0.dev0"
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.23.dev0"
__version__ = "0.24.dev0"
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.4.0.dev0
opentelemetry-proto == 1.5.0.dev0
backoff ~= 1.10.0

[options.extras_require]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@

import logging
from abc import ABC, abstractmethod
from collections.abc import Mapping, Sequence
from collections.abc import Sequence
from os import environ
from time import sleep
from typing import Any, Callable, Dict, Generic, List, Optional
from typing import Sequence as TypingSequence
from typing import Text, TypeVar
from urllib import parse
from urllib.parse import urlparse

from backoff import expo
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.4.0.dev0"
__version__ = "1.5.0.dev0"
Loading

0 comments on commit b31790a

Please sign in to comment.