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

Can't Publish Metrics with blank Names #37

Closed
michael-benoit opened this issue Feb 7, 2023 · 5 comments
Closed

Can't Publish Metrics with blank Names #37

michael-benoit opened this issue Feb 7, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@michael-benoit
Copy link

michael-benoit commented Feb 7, 2023

Don't know if this a bug or not but I'm trying to publish xDATA messages with blank names. If the name is blank or doesn't match the xBIRTH message, the metrics array in the payload ends up being empty.

Names are not required as part of the Sparkplug B spec.
Excerpt:
"Upon being defined in the NBIRTH or DBIRTH, subsequent messages can supply only the alias instead of
the metric friendly name to reduce overall message size."

TIA

@michael-benoit michael-benoit changed the title Empty Metric Names in NDATA Can't Publish Metrics with blank Names Feb 7, 2023
@SeppPenner
Copy link
Owner

Sounds like a bug (More or less something I used to overlook in the docs as I was just to eager about nullable checks and that stuff :D)

@SeppPenner SeppPenner self-assigned this Feb 21, 2023
@SeppPenner SeppPenner added the bug Something isn't working label Feb 21, 2023
@SeppPenner
Copy link
Owner

I read through the 3.0 spec and there are some more rules that seem to apply in this case:

▪ [tck-id-payloads-alias-birth-requirement] NBIRTH and DBIRTH messages MUST include both a metric name and alias.
▪ [tck-id-payloads-alias-data-cmd-requirement] NDATA, DDATA, NCMD, and DCMD messages MUST only include an alias and the metric name MUST be excluded.

So, to summarize this for me: If a metrics alias is used, the metric name and the metric alias must be set at birth and only the alias must be set at all other messages making it invalid if a metric name is set there.

@lsmythe
Copy link

lsmythe commented Feb 2, 2024

Has there been any progress made on this issue? Keen for an update :)

@SeppPenner
Copy link
Owner

Has there been any progress made on this issue? Keen for an update :)

Sorry, not yet. I try to work on the library today and tomorrow to fix the most crucial things...

@SeppPenner
Copy link
Owner

I have already added this in my current debugging state of the library, will check to fix this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants