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

Context tracer for flask #3573

Closed
wants to merge 100 commits into from

Conversation

liyanhui1228
Copy link
Contributor

Implemented a context tracer for flask. It can automatically grab the trace_id from the request headers and generate a trace context. Sample usage as below:

from google.cloud.trace.client import Client
from google.cloud.trace.tracer.flask_tracer import FlaskTracer

client = Client('project_id')
tracer = FlaskTracer(client)
tracer.start_trace()

with tracer.span('span1') as span1:
      do_something()
      with span1.span('child1') :
            do_something()

tracer.end_trace()

parthea and others added 30 commits June 21, 2017 07:39
The feature is not GA, which makes system testing problematic.

Development continues on the 'storage-requester_pays-feature' branch.
Note that the version number was bumped prematurely in PR 72e6e52.
(google-cloud-python-2)
    $ flake8 tests
    tests/system.py:178:32: F812 list comprehension redefines 'dataset' from line 170
    tests/system.py:233:30: F812 list comprehension redefines 'table' from line 225
    tests/system.py:841:9: F841 local variable 'dataset' is assigned to but never used
    tests/unit/test_table.py:406:23: W291 trailing whitespace
    tests/unit/test_table.py:1052:9: F841 local variable 'ROWS' is assigned to but never used
…_legacy_urlsafe (googleapis#3560)

Also

* add padding characters in `from_legacy_urlsafe` if needed
* add an extra example in the unit tests that actually requires base64 padding
Jon Wayne Parrott and others added 25 commits July 20, 2017 11:00
* Also add systest for user exception aborting transaction.
* Switched to google-resumable-media in BigQuery.
* Upgrading google-resumable-media dependency to 0.2.1.
* Add future interface to bigquery Jobs.
* Make QueryJob return QueryResults from result()
* Deprecate QueryJob.results()
* Removing vendored in google.cloud.streaming.

* Modifying setup.cfg so pytest errors are sane.

This is **not** to be merged, just to debug the b0rken build:
https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/2515
* Removing `get_credentials()` from `core`.

In the process also:

- Slight re-org on `nox.py` config (to pass posargs) for `core`
  and `datastore`
- Getting rid of last usage of `_Monkey` in datastore

This is part of `@jonparrott`'s effort to slim down / stabilize
`core`.

* Removing `google.cloud.credentials` module from docs.
Also bumping the version on the uber-package.
…s#3672)

* Simplifying Client constructor's for Bigtable and Spanner.

* Fixing Bigtable unit tests after Client re-factor.

Also slightly changing the Client constructor so that
it only called `with_scopes()` one time on the credentials
(was previously calling with `SCOPE=None` and then again with the
custom scope for the instance)

* Fixing Spanner unit tests after Client re-factor.

Also slightly changing the `copy()` method so that it
just passes the same credentials instance.

Also updating `nox` config to allow session `posargs`.

* Removing unused imports after Bigtable/Spanner Client re-factor.
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Jul 26, 2017
@liyanhui1228
Copy link
Contributor Author

This will be living in opencensus repository, closing it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the Cloud Trace API. cla: no This human has *not* signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.