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

Live tail does not stop during a network error #152

Open
FuShumin opened this issue May 8, 2024 · 1 comment
Open

Live tail does not stop during a network error #152

FuShumin opened this issue May 8, 2024 · 1 comment
Assignees
Labels
Platform Bug Bug related to the rest of Logfire

Comments

@FuShumin
Copy link

FuShumin commented May 8, 2024

Description

The timer of the Live tail does not stop as it failed to export spans during a network error (maybe?).
Here is the traceback:
3B9232E0-D076-461B-B144-5194601C937E

[WARNING 2024-05-07 09:38:15,509 _showwarnmsg:109] /usr/local/lib/python3.8/dist-packages/logfire/_internal/exporters/file.py:58: WritingFallbackWarning: Failed to export spans, writing to fallback file: /root/cnocr/.logfire/logfire_spans.bin
  warnings.warn(
 
[ERROR 2024-05-07 09:38:15,524 _export_batch:369] Exception while exporting Span batch. 
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 316, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 277, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/requests-2.28.2-py3.8.egg/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/packages/six.py", line 770, in reraise
    raise value
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/connectionpool.py", line 451, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/usr/local/lib/python3.8/dist-packages/urllib3-1.26.14-py3.8.egg/urllib3/connectionpool.py", line 340, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='logfire-api.pydantic.dev', port=443): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/opentelemetry/sdk/trace/export/__init__.py", line 367, in _export_batch
    self.span_exporter.export(self.spans_list[:idx])  # type: ignore
  File "/usr/local/lib/python3.8/dist-packages/logfire/_internal/exporters/remove_pending.py", line 45, in export
    return super().export(result)
  File "/usr/local/lib/python3.8/dist-packages/logfire/_internal/exporters/wrapper.py", line 14, in export
    return self.wrapped_exporter.export(spans)
  File "/usr/local/lib/python3.8/dist-packages/logfire/_internal/exporters/fallback.py", line 20, in export
    res = self.exporter.export(spans)
  File "/usr/local/lib/python3.8/dist-packages/logfire/_internal/exporters/otlp.py", line 56, in export
    return super().export(spans)
  File "/usr/local/lib/python3.8/dist-packages/logfire/_internal/exporters/wrapper.py", line 14, in export
    return self.wrapped_exporter.export(spans)
  File "/usr/local/lib/python3.8/dist-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py", line 145, in export
    resp = self._export(serialized_data)
  File "/usr/local/lib/python3.8/dist-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py", line 114, in _export
    return self._session.post(
  File "/usr/local/lib/python3.8/dist-packages/requests-2.28.2-py3.8.egg/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/requests-2.28.2-py3.8.egg/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/dist-packages/logfire/_internal/exporters/otlp.py", line 41, in send
    return super().send(request, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/requests-2.28.2-py3.8.egg/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/requests-2.28.2-py3.8.egg/requests/adapters.py", line 578, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='logfire-api.pydantic.dev', port=443): Read timed out. (read timeout=10)

Python, Logfire & OS Versions, related packages (not required)

logfire="0.30.0"
platform="Linux-5.10.104-tegra-aarch64-with-glibc2.29"
python="3.8.10 (default, Nov 14 2022, 12:59:47) 
[GCC 9.4.0]"
[related_packages]
requests="2.22.0"
requests="2.28.2"
pydantic="2.7.1"
fastapi="0.110.2"
protobuf="4.25.3"
rich="13.7.1"
tomli="2.0.1"
opentelemetry-api="1.24.0"
opentelemetry-exporter-otlp-proto-common="1.24.0"
opentelemetry-exporter-otlp-proto-http="1.24.0"
opentelemetry-instrumentation="0.45b0"
opentelemetry-instrumentation-asgi="0.45b0"
opentelemetry-instrumentation-fastapi="0.45b0"
opentelemetry-proto="1.24.0"
opentelemetry-sdk="1.24.0"
opentelemetry-semantic-conventions="0.45b0"
opentelemetry-util-http="0.45b0"
@FuShumin FuShumin added the Bug Bug related to the Logfire Python SDK label May 8, 2024
@e-hosseini
Copy link

Thank you for your feedback, @FuShumin.
We are aware of the issue and working on it. We will keep you updated on the progress.

@Kludex Kludex added Platform Bug Bug related to the rest of Logfire and removed Bug Bug related to the Logfire Python SDK labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Bug Bug related to the rest of Logfire
Projects
None yet
Development

No branches or pull requests

3 participants