Skip to content

Commit df91aa5

Browse files
authored
Merge branch 'main' into intrument-mysqlclient
2 parents 746fd31 + db90ce3 commit df91aa5

File tree

185 files changed

+2943
-1079
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+2943
-1079
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
1-
# Code owners file.
2-
# This file controls who is tagged for review for any given pull request.
3-
#
4-
# What is a "CODEOWNER"?
5-
#
6-
# A CODEOWNER lends their expertise to a specific package hosted by an OpenTelemetry repository.
7-
#
8-
# A CODEOWNER MUST:
9-
# - introduce themselves on the CNCF OTel Python channel: https://cloud-native.slack.com/archives/C01PD4HUVBL
10-
# - have enough knowledge of the corresponding instrumented library
11-
# - respond to issues
12-
# - fix failing unit tests or any other blockers to the CI/CD workflow
13-
# - update usage of `opentelemetry-python-core` APIs upon the introduction of breaking changes
14-
# - be a member of the OpenTelemetry community so that the `component-owners.yml` action to automatically assign CODEOWNERS to PRs works correctly.
15-
#
1+
# This file is only used as a way to assign any change to the approvers team
2+
# except for a change in any of the instrumentations. The actual codeowners
3+
# of the instrumentations are in .github/component_owners.yml.
164

17-
18-
# For anything not explicitly taken by someone else:
5+
# Assigns any change to the approvers team...
196
* @open-telemetry/opentelemetry-python-contrib-approvers
207

8+
# ...except for changes in any instrumentation.
9+
/instrumentation
10+
2111
# Learn about CODEOWNERS file format:
2212
# https://help.github.com/en/articles/about-code-owners
23-
#
24-
# Learn about membership in OpenTelemetry community:
25-
# https://github.com/open-telemetry/community/blob/main/community-membership.md
26-
#

.github/component_owners.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,23 @@ components:
4343

4444
instrumentation/opentelemetry-instrumentation-urllib:
4545
- shalevr
46+
- ocelotl
4647

4748
instrumentation/opentelemetry-instrumentation-urllib3:
4849
- shalevr
50+
- ocelotl
4951

5052
instrumentation/opentelemetry-instrumentation-sqlalchemy:
5153
- shalevr
54+
55+
instrumentation/opentelemetry-instrumentation-flask:
56+
- ocelotl
57+
58+
instrumentation/opentelemetry-instrumentation-jinja2:
59+
- ocelotl
60+
61+
instrumentation/opentelemetry-instrumentation-logging:
62+
- ocelotl
63+
64+
instrumentation/opentelemetry-instrumentation-requests:
65+
- ocelotl

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 2387b4465d930b020df79692a8097e1d54b66ec1
9+
CORE_REPO_SHA: e9530c5c548d08a6aaa56268d103f9beb00cd002
1010

1111
jobs:
1212
build:
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
2525
matrix:
2626
python-version: [ py37, py38, py39, py310, py311, pypy3 ]
27-
package: ["instrumentation", "distro", "exporter", "sdkextension", "propagator"]
27+
package: ["instrumentation", "distro", "exporter", "sdkextension", "propagator", "resource"]
2828
os: [ ubuntu-20.04 ]
2929
steps:
3030
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}

CHANGELOG.md

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,94 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
9+
- `opentelemetry-instrumentation-asgi` Add `http.server.request.size` metric
10+
([#1867](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1867))
911

10-
- `opentelemetry-instrumentation-system-metrics` Add `process.` prefix to `runtime.memory`, `runtime.cpu.time`, and `runtime.gc_count`. Change `runtime.memory` from count to UpDownCounter. ([#1735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1735))
12+
### Fixed
13+
14+
- Fix elastic-search instrumentation sanitization to support bulk queries
15+
([#1870](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1870))
16+
- Update falcon instrumentation to follow semantic conventions
17+
([#1824](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1824))
18+
- Fix sqlalchemy instrumentation wrap methods to accept sqlcommenter options
19+
([#1873](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1873))
20+
21+
### Added
22+
23+
- Add instrumentor support for mysqlclient
24+
([#1744](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1744))
25+
- Fix async redis clients not being traced correctly
26+
([#1830](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1830))
27+
- Make Flask request span attributes available for `start_span`.
28+
([#1784](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1784))
29+
- Fix falcon instrumentation's usage of Span Status to only set the description if the status code is ERROR.
30+
([#1840](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1840))
31+
- Instrument all httpx versions >= 0.18.
32+
([#1748](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1748))
33+
- Fix `Invalid type NoneType for attribute X (opentelemetry-instrumentation-aws-lambda)` error when some attributes do not exist
34+
([#1780](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1780))
35+
- Add metric instrumentation for celery
36+
([#1679](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1679))
37+
- `opentelemetry-instrumentation-asgi` Add `http.server.response.size` metric
38+
([#1789](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1789))
39+
- `opentelemetry-instrumentation-grpc` Allow gRPC connections via Unix socket
40+
([#1833](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1833))
41+
- Fix elasticsearch `Transport.perform_request` instrument wrap for elasticsearch >= 8
42+
([#1810](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1810))
43+
- `opentelemetry-instrumentation-urllib3` Add support for urllib3 version 2
44+
([#1879](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1879))
45+
- Add optional distro and configurator selection for auto-instrumentation
46+
([#1823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1823))
47+
48+
## Version 1.18.0/0.39b0 (2023-05-10)
49+
50+
- Update runtime metrics to follow semantic conventions
51+
([#1735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1735))
1152
- Add request and response hooks for GRPC instrumentation (client only)
1253
([#1706](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1706))
54+
- Fix memory leak in SQLAlchemy instrumentation where disposed `Engine` does not get garbage collected
55+
([#1771](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1771))
1356
- `opentelemetry-instrumentation-pymemcache` Update instrumentation to support pymemcache >4
1457
([#1764](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1764))
58+
- `opentelemetry-instrumentation-confluent-kafka` Add support for higher versions of confluent_kafka
59+
([#1815](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1815))
1560

1661
### Added
1762

1863
- Expand sqlalchemy pool.name to follow the semantic conventions
1964
([#1778](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1778))
2065
- Add `excluded_urls` functionality to `urllib` and `urllib3` instrumentations
2166
([#1733](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1733))
22-
- Make Django request span attributes available for `start_span`.
67+
- Make Django request span attributes available for `start_span`.
2368
([#1730](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1730))
24-
- Make ASGI request span attributes available for `start_span`.
69+
- Make ASGI request span attributes available for `start_span`.
2570
([#1762](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1762))
2671
- `opentelemetry-instrumentation-celery` Add support for anonymous tasks.
2772
([#1407](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1407))
2873
- `opentelemetry-instrumentation-logging` Add `otelTraceSampled` to instrumetation-logging
2974
([#1773](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1773))
30-
([#1407](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1407)
31-
- `opentelemetry-instrumentation-mysqlclient` Add instrumentor support for mysqlclient
32-
([#1744](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1744))
75+
76+
### Changed
77+
78+
- `opentelemetry-instrumentation-botocore` now uses the AWS X-Ray propagator by default
79+
([#1741](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1741))
3380

3481
### Fixed
3582

83+
- Fix redis db.statements to be sanitized by default
84+
([#1778](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1778))
3685
- Fix elasticsearch db.statement attribute to be sanitized by default
3786
([#1758](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1758))
3887
- Fix `AttributeError` when AWS Lambda handler receives a list event
3988
([#1738](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1738))
4089
- Fix `None does not implement middleware` error when there are no middlewares registered
4190
([#1766](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1766))
91+
- Fix Flask instrumentation to only close the span if it was created by the same request context.
92+
([#1692](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1692))
93+
94+
### Changed
95+
- Update HTTP server/client instrumentation span names to comply with spec
96+
([#1759](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1759))
4297

4398
## Version 1.17.0/0.38b0 (2023-03-22)
4499

@@ -127,6 +182,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
127182

128183
### Added
129184

185+
- `opentelemetry-resource-detector-container` Add support resource detection of container properties.
186+
([#1584](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1584))
130187
- `opentelemetry-instrumentation-pymysql` Add tests for commit() and rollback().
131188
([#1424](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424))
132189
- `opentelemetry-instrumentation-fastapi` Add support for regular expression matching and sanitization of HTTP headers.

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,17 @@ Open a pull request against the main `opentelemetry-python-contrib` repo.
124124
as `work-in-progress`, or mark it as [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
125125
* Make sure CLA is signed and CI is clear.
126126

127+
### How to Get PRs Reviewed
128+
129+
The maintainers and approvers of this repo are not experts in every instrumentation there is here.
130+
In fact each one of us knows enough about them to only review a few. Unfortunately it can be hard
131+
to find enough experts in every instrumentation to quickly review every instrumentation PR. The
132+
instrumentation experts are listed in `.github/component_owners.yml` with their corresponding files
133+
or directories that they own. The owners listed there will be notified when PRs that modify their
134+
files are opened.
135+
136+
If you are not getting reviews, please contact the respective owners directly.
137+
127138
### How to Get PRs Merged
128139

129140
A PR is considered to be **ready to merge** when:

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ depend on `opentelemetry-sdk` or another package that implements the API.
4949
**Please note** that these libraries are currently in _beta_, and shouldn't
5050
generally be used in production environments.
5151

52+
Unless explicitly stated otherwise, any instrumentation here for a particular library is not developed or maintained by the authors of such library.
53+
5254
The
5355
[`instrumentation/`](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation)
5456
directory includes OpenTelemetry instrumentation packages, which can be installed
@@ -95,12 +97,12 @@ Meeting notes are available as a public [Google doc](https://docs.google.com/doc
9597
Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telemetry/teams/python-approvers)):
9698

9799
- [Aaron Abbott](https://github.com/aabmass), Google
100+
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
98101
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
99-
- [Shalev Roda](https://github.com/shalevr), Cisco
100102

101103
Emeritus Approvers:
102104

103-
- [Hector Hernandez](https://github.com/hectorhdzg), Microsoft
105+
- [Héctor Hernández](https://github.com/hectorhdzg), Microsoft
104106
- [Yusuke Tsutsumi](https://github.com/toumorokoshi), Google
105107
- [Nathaniel Ruiz Nowell](https://github.com/NathanielRN), AWS
106108
- [Ashutosh Goel](https://github.com/ashu658), Cisco
@@ -111,12 +113,13 @@ Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-t
111113

112114
- [Diego Hurtado](https://github.com/ocelotl), Lightstep
113115
- [Leighton Chen](https://github.com/lzchen), Microsoft
114-
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
116+
- [Shalev Roda](https://github.com/shalevr), Cisco
115117

116118
Emeritus Maintainers:
117119

118120
- [Alex Boten](https://github.com/codeboten), Lightstep
119121
- [Owais Lone](https://github.com/owais), Splunk
122+
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
120123

121124
*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).*
122125

_template/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.39b0.dev"
15+
__version__ = "0.40b0.dev"

dev-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ bleach==4.1.0 # transient dependency for readme-renderer
1414
grpcio-tools==1.29.0
1515
mypy-protobuf>=1.23
1616
protobuf~=3.13
17-
markupsafe==2.0.1
17+
markupsafe>=2.0.1
1818
codespell==2.1.0
19-
requests==2.28.1
19+
requests==2.31.0
2020
ruamel.yaml==0.17.21

docs-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ boto~=2.0
2626
botocore~=1.0
2727
boto3~=1.0
2828
celery>=4.0
29-
confluent-kafka>= 1.8.2,< 2.0.0
29+
confluent-kafka>= 1.8.2,<= 2.2.0
3030
elasticsearch>=2.0,<9.0
3131
flask~=2.0
3232
falcon~=2.0

docs/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@
5454
if isdir(join(sdk_ext, f))
5555
]
5656

57-
sys.path[:0] = exp_dirs + instr_dirs + sdk_ext_dirs + prop_dirs
57+
resource = "../resource"
58+
resource_dirs = [
59+
os.path.abspath("/".join(["../resource", f, "src"]))
60+
for f in listdir(resource)
61+
if isdir(join(resource, f))
62+
]
63+
sys.path[:0] = exp_dirs + instr_dirs + sdk_ext_dirs + prop_dirs + resource_dirs
5864

5965
# -- Project information -----------------------------------------------------
6066

0 commit comments

Comments
 (0)