question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Beacon DefaultValue and use non-nullable types

See original GitHub issue

Following changes in #132 many or all nullable bool? may be changed to non-nullable bool when something like DefaultAttribute is used. E.g.

[Beacon("exf")] 
[DefaultValue(true)]
public bool IsFatal { get; set; }

[Beacon("ni")]
[DefaultValue(false)]
public bool NonInteractionHit { get; set; }

So, then the value == DefaultValue, then the property is not sent in the HTTP request.

Note: it may be applied to the TransactionRevenue, TransactionShipping, TransactionTax, too.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
maartenbacommented, Sep 14, 2017

Ok will close for now, but can always be reopened if we need it later.

1reaction
xmedekocommented, Sep 14, 2017

I am ok with not changing. It’s a minor benefit for me.

I just disagree with:

  • This way, with default value, the HTTP request is never bigger, but it may be smaller is the user sets the state, which is default.
  • In essence, the protocol itself has three states, but the Google Analytics (server) has two states (1, 0). IMO the client states should be made by the server states, not by the protocol abilities. It’s not about nicer code only, but about the code clarity, too.
Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Non-nullable reference types' default values VS ...
The default value of an (non-nullable) integer has always been 0 but to me it doesn't make sense a non-nullable string's default value...
Read more >
C# 8.0 nullable references: non-nullable is the new default
C# 8.0 has an ambitious new feature, called nullable references. In this post, Ian explains why this makes a fundamental change to the ......
Read more >
Working with nullable reference types - EF Core
C# 8 introduced a new feature called nullable reference types (NRT), allowing reference types to be annotated, indicating whether it is ...
Read more >
In a function, non-nullable optional parameters with default ...
I am trying to migrate a (large) flutter app to null sound safety and I encountered an issue on some functions where the...
Read more >
Dart Null Safety: The Ultimate Guide to Non-Nullable Types
A complete tour of Null Safety & non-nullable types, the syntax changes they introduce in Dart 2.12, and how to use them in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found