Skip to content

Allow to customize crash log level #751

Open

Description

@fleficher

Is your feature request related to a problem? Please describe.
We should be able to change the default log level for crashes. Currently, it's always set to EMERGENCY level while we would like to map them to ERROR level.

Describe the solution you'd like
From the Datadog Configuration.Builder, we should be able to customize the crash log level as:

 Datadog.initialize(
            context = context,
            configuration = Configuration.Builder(
                crashReportsEnabled = true,
                crashLogPriority = Log.ERROR,
            )
           // ...
        )

Activity

  1. added
    enhancement
    on Nov 5, 2021
  2. xgouchet commented on Nov 8, 2021

    @xgouchet
    Contributor

    Hi @fleficher , thanks a lot for this proposal. Right now we purposefully decided to mark crashes as Emergencies to distinguish them from manually logged errors (from catch blocks, for instance).
    Out of curiosity, what's your need into marking those as ERROR instead of EMERGENCY?

  3. fleficher commented on Nov 17, 2021

    @fleficher
    Author

    @xgouchet Currently we're using only 5 levels of logs (error, warning, etc.), which make it simplier to make dashboards.
    For the moment, we've made a pipeline to change the log level for crashes; which is working well.

  4. StylianosGakis commented on Jan 12, 2023

    @StylianosGakis

    We're having the exact same case. Are there any plans to have this be configurable? No other service we got is using the Emergency level log, which will make ours stand out and could also possibly make some people worried when those numbers start going up.

  5. xgouchet commented on Jan 13, 2023

    @xgouchet
    Contributor

    Hi @StylianosGakis , this is not in our immediate roadmap for now, as we want to distinguish actual crash from simply errors reported from try/catch blocks. You can use a logs pipeline to map the emergency status to something else, like @fleficher mentionned.

  6. StylianosGakis commented on Jan 13, 2023

    @StylianosGakis

    Yeah in our case it was mostly to not worry all the other engineers about suddenly having emergency logs while they've had 0 for a long time now.
    I understand that this is not in the roadmap right now, and I will try to simply inform everyone in my company instead to understand why they are there. Thanks for the response 🤗

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions