-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it closer to the actual Sentry spec. This will require tweaking OpenTelemetry.SpanProcessor in the other branch so that it creates Transaction structs with the correct fields.
- Loading branch information
Showing
9 changed files
with
135 additions
and
74 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
defmodule Sentry.TransactionTest do | ||
use Sentry.Case, async: true | ||
|
||
alias Sentry.Transaction | ||
|
||
import Sentry.TestHelpers | ||
|
||
describe "to_payload/1" do | ||
setup do | ||
{:ok, %{transaction: create_transaction()}} | ||
end | ||
|
||
test "returns a map representation of the transaction", %{transaction: transaction} do | ||
transaction_payload = Transaction.to_payload(transaction) | ||
|
||
[child_span] = transaction_payload[:spans] | ||
|
||
assert transaction_payload[:contexts][:trace][:trace_id] == "trace-312" | ||
|
||
assert child_span[:parent_span_id] == transaction.span_id | ||
assert child_span[:span_id] == "span-123" | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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