Skip to content

Commit

Permalink
Merge branch 'main' into fix-otlpexporter-preferred-aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv committed Feb 3, 2024
2 parents d60819a + c853bda commit 967521a
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 36 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Include key in attribute sequence warning
([#3639](https://github.com/open-telemetry/opentelemetry-python/pull/3639))
- Upgrade markupsafe, Flask and related dependencies to dev and test
environments ([#3609](https://github.com/open-telemetry/opentelemetry-python/pull/3609))
- Handle HTTP 2XX responses as successful in OTLP exporters
([#3623](https://github.com/open-telemetry/opentelemetry-python/pull/3623))
- Improve Resource Detector timeout messaging
Expand Down
5 changes: 1 addition & 4 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ sphinx-autodoc-typehints==1.25.2
pytest==7.1.3
pytest-cov==4.1.0
readme-renderer==42.0
# temporary fix. we should update the jinja, flask deps
# See https://github.com/pallets/markupsafe/issues/282
# breaking change introduced in markupsafe causes jinja, flask to break
markupsafe==2.0.1
markupsafe==2.1.3
bleach==4.1.0 # This dependency was updated to a breaking version.
codespell==2.1.0
requests==2.31.0
Expand Down
7 changes: 2 additions & 5 deletions docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ sphinx-jekyll-builder==0.3.0
grpcio~=1.27
Deprecated~=1.2
django~=4.2
flask~=1.0
flask~=2.3
opentracing~=2.2.0
thrift~=0.10
wrapt>=1.0.0,<2.0.0
# temporary fix. we should update the jinja, flask deps
# See https://github.com/pallets/markupsafe/issues/282
# breaking change introduced in markupsafe causes jinja, flask to break
markupsafe==2.0.1
markupsafe~=2.0

# Jaeger generated protobufs do not currently support protobuf 4.x. This can be removed once
# they're regenerated.
Expand Down
16 changes: 8 additions & 8 deletions docs/examples/fork-process-model/flask-gunicorn/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
click==7.1.2
Flask==2.3.2
click==8.1.7
Flask==2.3.3
googleapis-common-protos==1.52.0
grpcio==1.56.0
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
opentelemetry-api==1.20.0
opentelemetry-exporter-otlp==1.20.0
opentelemetry-instrumentation==0.41b0
opentelemetry-instrumentation-flask==0.41b0
opentelemetry-instrumentation-wsgi==0.41b0
opentelemetry-sdk==1.20.0
protobuf==3.18.3
protobuf==3.19.4
six==1.15.0
thrift==0.13.0
uWSGI==2.0.22
Werkzeug==2.2.3
wrapt==1.12.1
Werkzeug==3.0.1
wrapt==1.16.0
16 changes: 8 additions & 8 deletions docs/examples/fork-process-model/flask-uwsgi/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
click==7.1.2
Flask==2.3.2
click==8.1.7
Flask==2.3.3
googleapis-common-protos==1.52.0
grpcio==1.56.0
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
opentelemetry-api==1.20.0
opentelemetry-exporter-otlp==1.20.0
opentelemetry-instrumentation==0.41b0
opentelemetry-instrumentation-flask==0.41b0
opentelemetry-instrumentation-wsgi==0.41b0
opentelemetry-sdk==1.20.0
protobuf==3.18.3
protobuf==3.19.4
six==1.15.0
thrift==0.13.0
uWSGI==2.0.22
Werkzeug==2.2.3
wrapt==1.12.1
Werkzeug==3.0.1
wrapt==1.16.0
23 changes: 23 additions & 0 deletions docs/examples/metrics/prometheus-grafana/prometheus-monitor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import random
import time

from prometheus_client import start_http_server

from opentelemetry.exporter.prometheus import PrometheusMetricReader
from opentelemetry.metrics import get_meter_provider, set_meter_provider
from opentelemetry.sdk.metrics import MeterProvider

# Start Prometheus client
start_http_server(port=8000, addr="localhost")
# Exporter to export metrics to Prometheus
prefix = "MyAppPrefix"
reader = PrometheusMetricReader(prefix)
# Meter is responsible for creating and recording metrics
set_meter_provider(MeterProvider(metric_readers=[reader]))
meter = get_meter_provider().get_meter("view-name-change", "0.1.2")

my_counter = meter.create_counter("my.counter")

while 1:
my_counter.add(random.randint(1, 10))
time.sleep(random.random())
2 changes: 2 additions & 0 deletions docs/examples/metrics/prometheus-grafana/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
opentelemetry-exporter-prometheus==1.12.0rc1
protobuf~=3.18.1
4 changes: 2 additions & 2 deletions docs/getting_started/tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ charset-normalizer==2.0.12
click==8.1.7
Deprecated==1.2.14
flaky==3.7.0
Flask==2.0.1
Flask==2.3.3
idna==3.4
importlib-metadata==6.8.0
iniconfig==2.0.0
Expand All @@ -22,6 +22,6 @@ requests==2.26.0
tomli==2.0.1
typing_extensions==4.8.0
urllib3==1.26.18
Werkzeug==2.3.7
Werkzeug==3.0.1
wrapt==1.15.0
zipp==3.17.0
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ classifiers = [
]
dependencies = [
"Deprecated >= 1.2.6",
"backoff >= 1.10.0, < 2.0.0; python_version<'3.7'",
"backoff >= 1.10.0, < 3.0.0; python_version>='3.7'",
"backoff >= 1.8.0, < 3.0.0; python_version>='3.7'",
"googleapis-common-protos ~= 1.52",
"grpcio >= 1.0.0, < 2.0.0",
"opentelemetry-api ~= 1.15",
Expand Down
3 changes: 2 additions & 1 deletion opentelemetry-api/src/opentelemetry/attributes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ def _clean_attribute(
# Reject attribute value if sequence contains a value with an incompatible type.
if element_type not in _VALID_ATTR_VALUE_TYPES:
_logger.warning(
"Invalid type %s in attribute value sequence. Expected one of "
"Invalid type %s in attribute '%s' value sequence. Expected one of "
"%s or None",
element_type.__name__,
key,
[
valid_type.__name__
for valid_type in _VALID_ATTR_VALUE_TYPES
Expand Down
2 changes: 1 addition & 1 deletion shim/opentelemetry-opentracing-shim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies = [
[project.optional-dependencies]
test = [
"opentelemetry-test-utils == 0.44b0.dev",
"opentracing ~= 2.2.0",
"opentracing >= 2.2.0, <3",
]

[project.urls]
Expand Down
7 changes: 2 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,9 @@ deps =
# needed for tracecontext
aiohttp~=3.6
# needed for example trace integration
flask~=1.1
flask~=2.3
requests~=2.7
# temporary fix. we should update the jinja, flask deps
# See https://github.com/pallets/markupsafe/issues/282
# breaking change introduced in markupsafe causes jinja, flask to break
markupsafe==2.0.1
markupsafe~=2.1

commands_pre =
pip install -e {toxinidir}/opentelemetry-api \
Expand Down

0 comments on commit 967521a

Please sign in to comment.