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

InfluxDB does not support datapoints without fields #35132

Closed
apfitzge opened this issue Feb 7, 2024 · 3 comments · Fixed by #35133
Closed

InfluxDB does not support datapoints without fields #35132

apfitzge opened this issue Feb 7, 2024 · 3 comments · Fixed by #35133

Comments

@apfitzge
Copy link
Contributor

apfitzge commented Feb 7, 2024

Problem

  • Influx does not support datapoints without fields
  • We support sending datapoints without fields in our macros
  • If you send a metric without fields it will cause all points batched with it to not be written to database

Proposed Solution

  • Do not support writing datapoints with no fields through our macros
@apfitzge
Copy link
Contributor Author

apfitzge commented Feb 7, 2024

I wrote something to test this:

    loop {
        // datapoint_error!("datapoint-nofields");
        datapoint_error!("datapoint-withfields", ("field1", 5, i64));
        std::thread::sleep(std::time::Duration::from_secs(1));
    }

If I comment do not submit the datapoint-nofields I will see datapoint-withfields in my database.
If I do not comment it out, I see errors when writing the batches in MetricsAgent:

submit response unsuccessful: 400 Bad Request {"code":"invalid","message":"unable to parse 'datapoint-nofields,host_id=BioUwPnN7daq53JMTow8BRq6XGBz3djP4mKZCv6sAJct 1707333800103055331': invalid field format

@apfitzge
Copy link
Contributor Author

apfitzge commented Feb 7, 2024

Fields are a required piece of the InfluxDB data structure - you cannot have data in InfluxDB without fields.

@apfitzge
Copy link
Contributor Author

apfitzge commented Feb 7, 2024

I noticed this when searching for this metric:

datapoint_warn!("send_transaction_service-queue-overflow");

which I'd have expected to see since we see RPCs filling up their "queue" based on the separately submitted length counter.

This is probably causing us to lose some metrics submitted by RPCs, and was the only instance of a datapoint with no fields in our code (surprising!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant