Skip to content

Commit 6b2a132

Browse files
committed
WIP
1 parent 984a45d commit 6b2a132

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

lib/sentry/opentelemetry/sampler.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ if Code.ensure_loaded?(:otel_sampler) do
7171
end
7272
end
7373

74+
# IO.inspect(trace_id)
75+
# IO.inspect(ctx)
76+
# IO.inspect(span_name)
77+
# IO.inspect(attributes)
78+
# IO.inspect(result)
79+
7480
case result do
7581
{:drop, _, _} ->
7682
record_discarded_transaction()

test_integrations/phoenix_app/lib/phoenix_app/application.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ defmodule PhoenixApp.Application do
3030
# Start Oban
3131
{Oban, Application.fetch_env!(:phoenix_app, Oban)},
3232
# Start to serve requests, typically the last entry
33-
PhoenixAppWeb.Endpoint
33+
PhoenixAppWeb.Endpoint,
34+
Sentry.OpenTelemetry.SpanStorage
3435
]
3536

3637
# See https://hexdocs.pm/elixir/Supervisor.html

test_integrations/phoenix_app/test/phoenix_app/oban_test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ defmodule Sentry.Integrations.Phoenix.ObanTest do
55
import Sentry.TestHelpers
66

77
setup do
8-
put_test_config(dsn: "http://public:secret@localhost:8080/1")
8+
put_test_config(dsn: "http://public:secret@localhost:8080/1", traces_sample_rate: 1.0)
9+
910
Sentry.Test.start_collecting_sentry_reports()
1011

1112
:ok

test_integrations/phoenix_app/test/phoenix_app/repo_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule PhoenixApp.RepoTest do
66
import Sentry.TestHelpers
77

88
setup do
9-
put_test_config(dsn: "http://public:secret@localhost:8080/1")
9+
put_test_config(dsn: "http://public:secret@localhost:8080/1", traces_sample_rate: 1.0)
1010

1111
Sentry.Test.start_collecting_sentry_reports()
1212
end

test_integrations/phoenix_app/test/phoenix_app_web/controllers/exception_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Sentry.Integrations.Phoenix.ExceptionTest do
44
import Sentry.TestHelpers
55

66
setup do
7-
put_test_config(dsn: "http://public:secret@localhost:8080/1")
7+
put_test_config(dsn: "http://public:secret@localhost:8080/1", traces_sample_rate: 1.0)
88

99
Sentry.Test.start_collecting_sentry_reports()
1010
end

test_integrations/phoenix_app/test/phoenix_app_web/controllers/transaction_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Sentry.Integrations.Phoenix.TransactionTest do
44
import Sentry.TestHelpers
55

66
setup do
7-
put_test_config(dsn: "http://public:secret@localhost:8080/1")
7+
put_test_config(dsn: "http://public:secret@localhost:8080/1", traces_sample_rate: 1.0)
88

99
Sentry.Test.start_collecting_sentry_reports()
1010
end

0 commit comments

Comments
 (0)