-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(apm) Expose transaction start & end timestamp #14007
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
Changes from all commits
e26e352
0c40d72
bc6b388
1344a2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| { | ||
| "platform": "python", | ||
| "message": "", | ||
| "tags": [ | ||
| [ | ||
| "application", | ||
| "countries" | ||
| ], | ||
| [ | ||
| "browser", | ||
| "Python Requests 2.22" | ||
| ], | ||
| [ | ||
| "browser.name", | ||
| "Python Requests" | ||
| ], | ||
| [ | ||
| "environment", | ||
| "dev" | ||
| ], | ||
| [ | ||
| "release", | ||
| "v0.1" | ||
| ], | ||
| [ | ||
| "user", | ||
| "ip:127.0.0.1" | ||
| ], | ||
| [ | ||
| "trace", | ||
| "a7d67cf796774551a95be6543cacd459" | ||
| ], | ||
| [ | ||
| "trace.ctx", | ||
| "a7d67cf796774551a95be6543cacd459-babaae0d4b7512d9" | ||
| ], | ||
| [ | ||
| "trace.span", | ||
| "babaae0d4b7512d9" | ||
| ], | ||
| [ | ||
| "transaction", | ||
| "/country_by_code/" | ||
| ], | ||
| [ | ||
| "url", | ||
| "http://countries:8010/country_by_code/" | ||
| ] | ||
| ], | ||
| "breadcrumbs": { | ||
| "values": [ | ||
| { | ||
| "category": "query", | ||
| "timestamp":1562681591.0, | ||
| "message": "SELECT \"countries\".\"id\", \"countries\".\"name\", \"countries\".\"continent\", \"countries\".\"region\", \"countries\".\"surface_area\", \"coun...'CAN'", | ||
| "type": "default", | ||
| "level": "info" | ||
| } | ||
| ] | ||
| }, | ||
| "contexts": { | ||
| "runtime": { | ||
| "version": "3.7.3", | ||
| "type": "runtime", | ||
| "name": "CPython", | ||
| "build": "3.7.3 (default, Jun 27 2019, 22:53:21) \n[GCC 8.3.0]" | ||
| }, | ||
| "trace": { | ||
| "parent_span_id": "8988cec7cc0779c1", | ||
| "type": "trace", | ||
| "trace_id": "a7d67cf796774551a95be6543cacd459", | ||
| "span_id": "babaae0d4b7512d9" | ||
| }, | ||
| "browser": { | ||
| "version": "2.22", | ||
| "type": "browser", | ||
| "name": "Python Requests" | ||
| } | ||
| }, | ||
| "culprit": "/country_by_code/", | ||
| "environment": "dev", | ||
| "extra": {}, | ||
| "logger": "", | ||
| "metadata": { | ||
| "location": "/country_by_code/", | ||
| "title": "/country_by_code/" | ||
| }, | ||
| "request": { | ||
| "url": "http://countries:8010/country_by_code/", | ||
| "headers": [ | ||
| [ | ||
| "Accept", | ||
| "*/*" | ||
| ], | ||
| [ | ||
| "Accept-Encoding", | ||
| "gzip, deflate" | ||
| ], | ||
| [ | ||
| "Connection", | ||
| "keep-alive" | ||
| ], | ||
| [ | ||
| "Content-Length", | ||
| "" | ||
| ], | ||
| [ | ||
| "Content-Type", | ||
| "text/plain" | ||
| ], | ||
| [ | ||
| "Host", | ||
| "countries:8010" | ||
| ], | ||
| [ | ||
| "Sentry-Trace", | ||
| "a7d67cf796774551a95be6543cacd459-8988cec7cc0779c1-1" | ||
| ], | ||
| [ | ||
| "User-Agent", | ||
| "python-requests/2.22.0" | ||
| ] | ||
| ], | ||
| "env": { | ||
| "SERVER_PORT": "8010", | ||
| "SERVER_NAME": "a90286977562" | ||
| }, | ||
| "query_string": [ | ||
| [ | ||
| "code", | ||
| "CAN" | ||
| ] | ||
| ], | ||
| "method": "GET", | ||
| "inferred_content_type": "text/plain" | ||
| }, | ||
| "spans": [ | ||
| { | ||
| "start_timestamp": 1562681591.0, | ||
| "same_process_as_parent":true, | ||
| "description": "Django: SELECT \"countries\".\"id\", \"countries\".\"name\", \"countries\".\"continent\", \"countries\".\"region\", \"countries\".\"surface_area\", \"coun...'CAN'", | ||
| "tags": { | ||
| "error":false | ||
| }, | ||
| "timestamp":1562681591.0, | ||
| "parent_span_id": "babaae0d4b7512d9", | ||
| "trace_id": "a7d67cf796774551a95be6543cacd459", | ||
| "op": "db", | ||
| "data": {}, | ||
| "span_id": "b048b4c8fdc5168c" | ||
| } | ||
| ], | ||
| "start_timestamp": 1562681591.0, | ||
| "timestamp": 1562681591.0, | ||
| "transaction": "/country_by_code/", | ||
| "type": "transaction", | ||
| "user": { | ||
| "ip_address": "127.0.0.1" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -132,7 +132,7 @@ def load_data(platform, default=None, sample_name=None): | |
| return | ||
|
|
||
| data = CanonicalKeyDict(data) | ||
| if platform in ('csp', 'hkpk', 'expectct', 'expectstaple'): | ||
| if platform in ('transaction', 'csp', 'hkpk', 'expectct', 'expectstaple'): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this change needed ? It was not here in the previous version if I remember correctly
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without this the sample transaction event gets data added to the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, but "transaction" should not be a platform. By doing this we are overloading the meaning and behavior of a parameter. Also you are skipping line 145 where the "platform" field is added to data. Is this intentional.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable name |
||
| return data | ||
|
|
||
| data['platform'] = platform | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a few dependencies on dateCreated
Are these going to be ok if you remove the field? I suspect there is no acceptance test that go through transaction event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good finds. The modal graph and content component do need to be updated. The GroupDetailsToolbar should be fine as transaction events won't have groups.