logfire icon indicating copy to clipboard operation
logfire copied to clipboard

Show message from logfire platform

Open samuelcolvin opened this issue 1 year ago • 1 comments

Description

In typical usage, the SDK should make a request to the logfire API at process start:

  • the request should include: python version, SDK version, platform
  • if the request times out or returns a 5XX error, the SDK should show a warning
  • based on the response body, the SDK should show and arbitrary message, perhaps we have message and level so warnings can be shown in a different color, or even in a more prominent box

In particular we should use this notify the user if they're using an outdated version of the SDK, but the idea is to make the SDK as "dumb" as possible in case we want to change the logic in future.

This request should not be made if:

  • send_to_logfire=False
  • base_url is anything other than logfire

samuelcolvin avatar May 27 '24 15:05 samuelcolvin

Can we also put this in the front end? I expect most of the requests made from the SDK will be from somewhere like a deployment where no one is looking at it and so they’d have to have a warning set up in logfire itself or something. Easier to show this in a “services summary” page alongside error count, etc.

adriangb avatar May 28 '24 01:05 adriangb