diff --git a/charmcraft.yaml b/charmcraft.yaml index ad9c796..f82ceff 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -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 diff --git a/src/tempo.py b/src/tempo.py index 5c346f6..052dee7 100644 --- a/src/tempo.py +++ b/src/tempo.py @@ -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: diff --git a/tests/scenario/test_enabled_receivers.py b/tests/scenario/test_enabled_receivers.py index d12be15..cbc6a20 100644 --- a/tests/scenario/test_enabled_receivers.py +++ b/tests/scenario/test_enabled_receivers.py @@ -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] @@ -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)