Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldmitry committed Jun 30, 2024
1 parent ad2da3a commit 3ac7474
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ parts:
config:
options:
always_enable_zipkin:
description: force enable a receiver for Tempo's 'zipkin' protocol.
description: Force-enable the receiver for the 'zipkin' protocol in Tempo, even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_otlp_grpc:
description: force enable a receiver for Tempo's 'otlp_grpc' protocol.
description: Force-enable the receiver for the 'otlp_grpc' protocol in Tempo, even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_otlp_http:
description: force enable a receiver for Tempo's 'otlp_http' protocol.
description: Force-enable the receiver for the 'otlp_http' protocol in Tempo, even if there is no integration currently requesting it.
type: boolean
default: false
4 changes: 2 additions & 2 deletions src/tempo.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ def is_ready(self):

def _build_receivers_config(self, receivers: Sequence[ReceiverProtocol]): # noqa: C901
# receivers: the receivers we have to enable because the requirers we're related to
# intend to use them
# it already includes self.enabled_receivers: receivers we have to enable because *this charm* will use them.
# intend to use them. It already includes receivers that are always enabled
# through config or because *this charm* will use them.
receivers_set = set(receivers)

if not receivers_set:
Expand Down
4 changes: 2 additions & 2 deletions tests/scenario/test_enabled_receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_receivers_with_relations(context, s3, all_worker):
with context.manager(tracing.changed_event, state) as mgr:
charm: TempoCoordinatorCharm = mgr.charm
# extra receivers should only include default otlp_http
assert charm.enabled_receivers == set(["otlp_http"])
assert charm.enabled_receivers == {"otlp_http"}
out = mgr.run()

tracing_out = out.get_relations(tracing.endpoint)[0]
Expand Down Expand Up @@ -69,7 +69,7 @@ def test_receivers_with_relations_and_config(context, s3, all_worker):
with context.manager("config-changed", state) as mgr:
charm: TempoCoordinatorCharm = mgr.charm
# extra receivers should only include default otlp_http
assert charm.enabled_receivers == set(["otlp_http", "zipkin"])
assert charm.enabled_receivers == {"otlp_http", "zipkin"}

# run action
action_out = context.run_action("list-receivers", state)
Expand Down

0 comments on commit 3ac7474

Please sign in to comment.