You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instrumentation is currently pretty sparse and generally janky. Whatever logging exists is done using print statements whose outputs have to be checked by connecting to the server and running docker logs -f [container_id]. Instrumentation can be done a lot better by using a solution like Sentry.
At the time of writing, Duolicious serves 65.61M requests per 30 days (according to Cloudflare), but sentry's free tier only allows for 10M spans and 5k errors. We can't afford anything more than the free tier, so if we opt for Sentry, we'll need to sample transactions.
What I'd really be interested in is a) profiling each endpoint; and b) checking for 5xx errors. Though I've never used Sentry before, so I'm not sure if there's easier wins to be had. Sentry's documentation shows this very straightforward implementation:
importsentry_sdkfromflaskimportFlaskfromsentry_sdk.integrations.flaskimportFlaskIntegrationsentry_sdk.init(
dsn="https://<key>@sentry.io/<project>",
integrations=[FlaskIntegration()],
# Set traces_sample_rate to 1.0 to capture 100%# of transactions for Tracing.# We recommend adjusting this value in production,traces_sample_rate=1.0
)
app=Flask(__name__)
The chat service, which is probably the least reliable part of Duolicious for reasons partly explained here, will need to be instrumented separately to the REST API.
The text was updated successfully, but these errors were encountered:
Instrumentation is currently pretty sparse and generally janky. Whatever logging exists is done using
print
statements whose outputs have to be checked by connecting to the server and runningdocker logs -f [container_id]
. Instrumentation can be done a lot better by using a solution like Sentry.At the time of writing, Duolicious serves 65.61M requests per 30 days (according to Cloudflare), but sentry's free tier only allows for 10M spans and 5k errors. We can't afford anything more than the free tier, so if we opt for Sentry, we'll need to sample transactions.
What I'd really be interested in is a) profiling each endpoint; and b) checking for 5xx errors. Though I've never used Sentry before, so I'm not sure if there's easier wins to be had. Sentry's documentation shows this very straightforward implementation:
Hopefully it plays nicely with the decorators I've written for all the REST API endpoints.
The chat service, which is probably the least reliable part of Duolicious for reasons partly explained here, will need to be instrumented separately to the REST API.
The text was updated successfully, but these errors were encountered: