quickstart-unity icon indicating copy to clipboard operation
quickstart-unity copied to clipboard

[FR] Ability to remove custom key

Open ByMedion opened this issue 3 years ago • 4 comments

Hi! It would be cool if it was possible to delete a custom key when it is no longer needed.

Example: when entering the game screen, I create a custom key "level_config", in which I specify some data (level id and etc.). After exiting the game screen, I no longer need to see this key in the list in the next possible error (of course, if it happened not on the game screen).

Now I can clear the key value, but it will still remain in the list. If there are many such keys depending on some condition, then the list will turn into a mess!

ByMedion avatar Oct 31 '21 23:10 ByMedion

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Oct 31 '21 23:10 google-oss-bot

@paulinon Hello! I apologize, I forgot to clarify that this question is about crashlytics, not for analytics. I think the label should be "api: crashlytics"

ByMedion avatar Nov 03 '21 22:11 ByMedion

Hey @ByMedion - you may be able to do this by passing a null to the SetCustomKey method. Let me know what you experience (and whether this is different on Android vs iOS).

samedson avatar Jan 12 '22 16:01 samedson

In SetCustomKey there is null check for value, and throws exception, otherwise people suggested that it actually might work. could you remove this null check ?

 public override void SetCustomKey(string key, string value)
    {
      if (key == null || value == null)
        throw new ArgumentNullException("key and value should not be null");
      this.CallInternalMethod((System.Action) (() => this.crashlyticsInternal.SetCustomKey(key, value)), nameof (SetCustomKey));
    }

FrantisekHolubec avatar Apr 24 '24 10:04 FrantisekHolubec