Arduino example can't send

I’m a newbie, so apologies, but I did search first…

I am following the example given at:

and after messing around getting the right cert, I am able to connect. My ESP32 is reading valid data from the sensor. When the ESP32 attempts to send to Grafana Cloud, the following is logged:

`Begin serialization: Free Heap: 234540
Bytes used for serialization: 672
After serialization: Free Heap: 234540
After Compression Init: Free Heap: 234012
Required buffer size for compression: 816
Compressed Len: 363
After Compression: Free Heap: 234540
Sending To Prometheus
Sent, waiting for response
Timed out connecting to Loki

The code compiles clean and the fact I got connected suggests that the API key and account are correct, as is the url (which looks different to the article).

We’re failing here:

PromClient::SendResult res = client.send(req);
        if (!res == PromClient::SendResult::SUCCESS) {
            // Note: additional retries or error handling could be implemented here.
            // the result could also be:
            // PromClient::SendResult::FAILED_DONT_RETRY
            // PromClient::SendResult::FAILED_RETRYABLE

My question is “what did I miss?”

Happy to post the full code if anyone cares to take a look.


Solved my own problem:

in config.h, I did a copy and paste of the URL, then I re-read the docs and I had “https://” at the beginning. Removed that and data now seems to be flowing in!

…amazing what a decent coffee can do!