feat(tracing): Initial tracing experiments#342
Merged
Conversation
Contributor
Author
|
(This is not intended for merging, just for experimenting) |
Member
|
I think we could infer span context from request headers so each server integration doesn't need to change. Possibly even backfill during event processing although if that is necessary tracing is already broken |
Contributor
Author
from flask import Flask
import requests
import sentry_sdk
import sentry_sdk.integrations.flask
sentry_sdk.init(
dsn='...',
propagate_traces=['http://localhost:5000'],
integrations=[sentry_sdk.integrations.flask.FlaskIntegration()]
)
app = Flask(__name__)
@app.route('/')
def call_out():
return requests.get('http://localhost:5000/broken').json()['foo']
@app.route('/broken')
def broken():
1 / 0 |
untitaker
reviewed
Apr 17, 2019
HazAT
reviewed
Apr 25, 2019
| foo = 42 # noqa | ||
| return x / y | ||
|
|
||
| span_context = SpanContext.start_trace() |
Member
There was a problem hiding this comment.
Is there a reason why we just can do "new SpanContext"?
The ctor can set the values, since we are not measuring time, this can simplify the API.
Contributor
Author
There was a problem hiding this comment.
For prosperity from a conversation in person: Mostly just so that the ctor will not attempt to auto generate. We can change this, that was just an early draft.
untitaker
approved these changes
Apr 29, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the most basic hack I could come up with that gets us into the direction
of correlating errors. It currently uses a made up
tracecontext but i thinkrealistically speaking we probably want to use attributes for this.