Skip to content

added transaction type to error events #391

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion elasticapm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def _build_msg_for_logging(
event_data["trace_id"] = transaction.trace_parent.trace_id
event_data["parent_id"] = transaction.id
event_data["transaction_id"] = transaction.id
event_data["transaction"] = {"sampled": transaction.is_sampled}
event_data["transaction"] = {"sampled": transaction.is_sampled, "type": transaction.transaction_type}

return event_data

Expand Down
1 change: 1 addition & 0 deletions tests/client/client_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ def test_transaction_data_is_attached_to_errors(elasticapm_client):
assert "transaction_id" not in errors[0]
assert errors[1]["transaction_id"] == transaction.id
assert errors[1]["transaction"]["sampled"]
assert errors[1]["transaction"]["type"] == "test"
assert "transaction_id" not in errors[2]


Expand Down