Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Telemetry #819

Merged
merged 45 commits into from
Jul 23, 2024
Merged

Open Telemetry #819

merged 45 commits into from
Jul 23, 2024

Conversation

Xaelias
Copy link
Collaborator

@Xaelias Xaelias commented Dec 22, 2023

This PR implements otel for http and thrift in bp.py.
Because of unsolvable conflicting dependencies, this also removes python 3.7.

@Xaelias Xaelias force-pushed the aleksei.lesieur/opentelemetry2 branch 2 times, most recently from 538a52b to 6f85007 Compare December 22, 2023 18:02
@Xaelias Xaelias marked this pull request as ready for review December 22, 2023 22:01
@Xaelias Xaelias requested a review from a team as a code owner December 22, 2023 22:01
@trevorriles
Copy link
Contributor

@chriskuehl you mentioned that there is some changes that have made it to develop but not been released yet. Would it be better for us to target a release branch?

@trevorriles trevorriles self-assigned this Jan 19, 2024
Copy link
Member

@chriskuehl chriskuehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass review -- it would be a good idea to have someone more familiar with the tracing bits also take a look.

.github/workflows/python-package.yaml Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
baseplate/clients/requests.py Show resolved Hide resolved
baseplate/clients/thrift.py Outdated Show resolved Hide resolved
baseplate/clients/thrift.py Outdated Show resolved Hide resolved
baseplate/frameworks/pyramid/__init__.py Outdated Show resolved Hide resolved
baseplate/frameworks/pyramid/__init__.py Outdated Show resolved Hide resolved
baseplate/frameworks/thrift/__init__.py Outdated Show resolved Hide resolved
baseplate/lib/propagator_redditb3.py Outdated Show resolved Hide resolved
baseplate/lib/propagator_redditb3.py Outdated Show resolved Hide resolved
@chriskuehl chriskuehl mentioned this pull request Jan 19, 2024
3 tasks
@trevorriles
Copy link
Contributor

I've got develop merged in and all the tests passing. I'll begin addressing the other PR comments next.

One thing to note is that opentelemetry-python doesn't officially support 3.12 yet, so we may have to wait for that or restrict baseplate to 3.11 for the time being.

@trevorriles
Copy link
Contributor

@chriskuehl I'm curious what your thoughts are on the lack of 3.12 support at the moment?

open-telemetry/opentelemetry-python#3617

@chriskuehl
Copy link
Member

@chriskuehl I'm curious what your thoughts are on the lack of 3.12 support at the moment?

I don't think we can merge this until 3.12 support is available, since we already have services which have migrated to 3.12.

Copy link
Member

@chriskuehl chriskuehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable but given the size it's difficult to catch any bugs during review. I think we should discuss how we want to test this before the final release.

Let's also get a review from someone more familiar with our tracing setup before merging, since I'm not really qualified to review that beyond basic logic checking.

Dockerfile Outdated Show resolved Hide resolved
baseplate/clients/thrift.py Show resolved Hide resolved
baseplate/lib/propagator_redditb3_http.py Outdated Show resolved Hide resolved
baseplate/lib/propagator_redditb3_thrift.py Outdated Show resolved Hide resolved
baseplate/server/__init__.py Outdated Show resolved Hide resolved
tests/integration/otel_thrift_tests.py Outdated Show resolved Hide resolved
@trevorriles
Copy link
Contributor

This looks reasonable but given the size it's difficult to catch any bugs during review. I think we should discuss how we want to test this before the final release.

Fully on board here, here are two testing steps I want to take before we cut an official release:

  • Additional testing in snoodev to verify context propagation general functionality
  • Cut some form of alpha release and work with teams that are still < 3.12. This will make it easier for them to test in snoodev and possibly even some canary testing.

With the 3.12 limitation I'm interested in your thoughts around maintaining an otel branch/release that will be limited to 3.11 and below until we can get the upstream issues resolved?

Let's also get a review from someone more familiar with our tracing setup before merging, since I'm not really qualified to review that beyond basic logic checking.

I'm sure we can get @Xaelias to give this another pass, since I've taken this over. Not sure if you can approve your own PR though. Ultimately we are the two people who have context to the tracing work here. Pete Loaf has done most of the golang work, but I'm not sure if it makes sense to have him review here as well or not?

Comment on lines 233 to 239
sample_rps = 10
try:
sample_rps = DefaultFromEnv(Integer, "BASEPLATE_TRACE_SAMPLER_RPS", 10)
except ValueError:
logger.warning(
"Invalid BASEPLATE_TRACE_SAMPLER_RPS, falling back to the default of 10 RPS."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chriskuehl I'm trying to use DefaultFromEnv as suggested but I think I'm misunderstanding how this is supposed to work. Does this also require implementing these options in the ini based config to get it to work?

@trevorriles trevorriles requested a review from redloaf June 3, 2024 15:43
baseplate/frameworks/thrift/__init__.py Outdated Show resolved Hide resolved
trevorriles and others added 15 commits June 6, 2024 10:06
Bumps [lxml](https://github.com/lxml/lxml) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-5.2.1...lxml-5.2.2)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [boto3](https://github.com/boto/boto3) from 1.34.95 to 1.34.117.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.34.95...1.34.117)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@0ad4b8f...a5ac7e5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.18 to 1.26.19.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/1.26.19/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.18...1.26.19)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.12.0 to 4.12.2.
- [Release notes](https://github.com/python/typing_extensions/releases)
- [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md)
- [Commits](python/typing_extensions@4.12.0...4.12.2)

---
updated-dependencies:
- dependency-name: typing-extensions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [moto](https://github.com/getmoto/moto) from 5.0.9 to 5.0.10.
- [Release notes](https://github.com/getmoto/moto/releases)
- [Changelog](https://github.com/getmoto/moto/blob/master/CHANGELOG.md)
- [Commits](getmoto/moto@5.0.9...5.0.10)

---
updated-dependencies:
- dependency-name: moto
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.2 to 3.2.5.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v3.2.2...v3.2.5)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [flake8](https://github.com/pycqa/flake8) from 7.0.0 to 7.1.0.
- [Commits](PyCQA/flake8@7.0.0...7.1.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [types-setuptools](https://github.com/python/typeshed) from 70.0.0.20240524 to 70.1.0.20240627.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [boto3](https://github.com/boto/boto3) from 1.34.117 to 1.34.136.
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](boto/boto3@1.34.117...1.34.136)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.2.2 to 2024.7.4.
- [Commits](certifi/python-certifi@2024.02.02...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ig will come with a future release keeping us aligned with baseplate.go v2
@trevorriles trevorriles merged commit 3423a65 into develop Jul 23, 2024
5 checks passed
@trevorriles trevorriles deleted the aleksei.lesieur/opentelemetry2 branch July 23, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants