Skip to content

Commit

Permalink
Remove OTEL attributes from shape log collector since we removed thos…
Browse files Browse the repository at this point in the history
…e spans
  • Loading branch information
kevin-dp committed Dec 2, 2024
1 parent ec16f9d commit 9e05bc5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
9 changes: 3 additions & 6 deletions packages/sync-service/lib/electric/connection/manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ defmodule Electric.Connection.Manager do
:tweaks,
awaiting_active: [],
drop_slot_requested: false,
monitoring_started?: false,
otel_attrs: []
monitoring_started?: false
]
end

Expand Down Expand Up @@ -187,8 +186,7 @@ defmodule Electric.Connection.Manager do
backoff: {:backoff.init(1000, 10_000), nil},
stack_id: Keyword.fetch!(opts, :stack_id),
stack_events_registry: Keyword.fetch!(opts, :stack_events_registry),
tweaks: Keyword.fetch!(opts, :tweaks),
otel_attrs: Keyword.fetch!(opts, :otel_attrs)
tweaks: Keyword.fetch!(opts, :tweaks)
}

# Try to acquire the connection lock on the replication slot
Expand Down Expand Up @@ -316,8 +314,7 @@ defmodule Electric.Connection.Manager do
stack_id: state.stack_id,
shape_cache_opts: shape_cache_opts,
stack_events_registry: state.stack_events_registry,
tweaks: state.tweaks,
otel_attrs: state.otel_attrs
tweaks: state.tweaks
)

# Everything is ready to start accepting and processing logical messages from Postgres.
Expand Down
4 changes: 1 addition & 3 deletions packages/sync-service/lib/electric/connection/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ defmodule Electric.Connection.Supervisor do
stack_id = Keyword.fetch!(opts, :stack_id)
shape_cache_opts = Keyword.fetch!(opts, :shape_cache_opts)
inspector = Keyword.fetch!(shape_cache_opts, :inspector)
otel_attrs = Keyword.fetch!(opts, :otel_attrs)

shape_cache_spec = {Electric.ShapeCache, shape_cache_opts}

shape_log_collector_spec =
{Electric.Replication.ShapeLogCollector,
stack_id: stack_id, inspector: inspector}
{Electric.Replication.ShapeLogCollector, stack_id: stack_id, inspector: inspector}

child_spec =
Supervisor.child_spec(
Expand Down
1 change: 0 additions & 1 deletion packages/sync-service/lib/electric/stack_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ defmodule Electric.StackSupervisor do

new_connection_manager_opts = [
stack_id: stack_id,
otel_attrs: otel_attrs,
# Coming from the outside, need validation
connection_opts: config.connection_opts,
stack_events_registry: config.stack_events_registry,
Expand Down

0 comments on commit 9e05bc5

Please sign in to comment.