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.

Instrument name validation

See original GitHub issue

Instrument name has to be validated as per the spec. The .NET API itself does not validate this, so the SDK has to validate the instrument name (upon instrument creation), and ignore the instrument (after logging that we are ignoring an instrument due to … reason).

For Views, which provide new name for the Metric, the validation can be done in the AddView itself and can throw/fail fast on AddView.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cijothomascommented, Oct 6, 2021

@joaopgrassi Assigned to you! 2 places:

  1. Yes instrument publish callback. (this is what gets called when someone does meter.CreateCounter etc)
  2. in the AddView, which allows one to rename an instrument. So we should be validating the effective name only, not the original instrument name.

You can start without the View part, and later add it.

0reactions
cijothomascommented, Oct 7, 2021

You are right about the View part - we can only fail fast if the name is know at AddView method itself, and not with the Func returning config option.

I missed to read the part about “duplication” earlier - you are right that even if we do the validation in AddView, the instrument publish still has to do it. Its okay for now - we might be able to optimize this a bit more later (require some more refactoring of provider)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Name Validation | Verification
Name Validation verifies first & last names by performing a 40-step check to help your business weed out bogus and inaccurate names.
Read more >
What is Instrument Validation and Why Do I Have to Do It?
Therefore, instrument validation can provide valuable information to diagnose the condition of an instrument. It is recommended to perform ...
Read more >
The 6 Best Validation, Verification & Formatting Tools for…
Record Validation (RV ) is a fantastic tool for verifying, validating & formatting the records in your system. Like all Plauti solutions, RV...
Read more >
Instrument Validation — Science Website - NRAO
The NRAO defaults adhere to the following naming scheme: the first letter denotes the receiver band, the number following signifies the total number...
Read more >
Method of preparing a document for survey instrument ...
Validation of a survey instrument is an important activity in the research process. Face validity and content ... Method name, Instrument validation method....
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