Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traefik looks for otlp_grpc tracing endpoint but has not requested it #304

Closed
PietroPasotti opened this issue Mar 1, 2024 · 1 comment
Closed

Comments

@PietroPasotti
Copy link
Contributor

Bug Description

When relating tempo to traefik, if tempo does not reply with an otlp_http endpoint, traefik will look for a grpc one.
However that's not been requested in init and so that raises an exception.

To Reproduce

juju deploy tempo
juju deploy traefik
jhack imatrix fill

boom

Environment

n/a

Relevant log output

[...snip]



 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/venv/ops/framework.py", line 865, in _emit
   self._reemit(event_path)
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/venv/ops/framework.py", line 955, in _reemit
   custom_handler(event)
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/lib/charms/tempo_k8s/v2/tracing.py", line 780, in _on_tracing_relation_changed
   self.on.endpoint_changed.emit(relation, data.host, [i.dict() for i in data.receivers])  # type: ignore
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/venv/ops/framework.py", line 352, in emit
   framework._emit(event)
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/venv/ops/framework.py", line 865, in _emit
   self._reemit(event_path)
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/venv/ops/framework.py", line 955, in _reemit
   custom_handler(event)
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/lib/charms/tempo_k8s/v1/charm_tracing.py", line 532, in wrapped_function
   return callable(*args, **kwargs)  # type: ignore
 File "./src/charm.py", line 370, in _on_tracing_endpoint_changed
   self._configure_tracing()
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/lib/charms/tempo_k8s/v1/charm_tracing.py", line 532, in wrapped_function
   return callable(*args, **kwargs)  # type: ignore
 File "./src/charm.py", line 436, in _configure_tracing
   elif endpoint := self._tracing.otlp_grpc_endpoint():
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/lib/charms/tempo_k8s/v2/tracing.py", line 838, in otlp_grpc_endpoint
   return self.get_endpoint("otlp_grpc")
 File "/var/lib/juju/agents/unit-traefik-k8s-0/charm/lib/charms/tempo_k8s/v2/tracing.py", line 826, in get_endpoint
   raise ProtocolNotRequestedError(protocol, relation)
harms.tempo_k8s.v2.tracing.ProtocolNotRequestedError: ('otlp_grpc', <ops.model.Relation tracing:42>)

Additional context

No response

@PietroPasotti
Copy link
Contributor Author

solved by #299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant