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

[Feature Request] JSON formatted Logs #3292

Open
camilla11 opened this issue May 16, 2024 · 0 comments
Open

[Feature Request] JSON formatted Logs #3292

camilla11 opened this issue May 16, 2024 · 0 comments
Labels
enhancement New feature or request long-term

Comments

@camilla11
Copy link

Is your feature request related to a problem? Please describe.
We are exporting logs to datadog, and would like exceptions to show up in a single log line. Via the Datadog guidelines, this requires that logs be output in JSON format https://www.datadoghq.com/blog/python-logging-best-practices/#log-in-json-format. We can configure the format of logs in our custom code but the log format for logs from the promptflow executor or serving app use their own format and re #2852 we can only change format (I'm unsure if we can use this to resemble JSON, especially in exceptions)

Describe the solution you'd like
Ability to specify log formatter library for logs. For example https://github.com/madzak/python-json-logger or https://pypi.org/project/JSON-log-formatter/

Describe alternatives you've considered
Using the new feature above to resemble JSON
Trying to hook into Flask handlers like: @app.errorhandler(400) and @app.errorhandler(Exception) with no luck

Additional context
Add any other context or screenshots about the feature request here.

@camilla11 camilla11 added the enhancement New feature or request label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request long-term
Projects
None yet
Development

No branches or pull requests

3 participants