Ask Miss O11y: Error: missing ‘x-honeycomb-dataset’ headerBy Jessica Kerr | Last modified on March 1, 2023
“Dear Miss O11y,
I recently got this error when sending traces to Honeycomb: Missing 'x-honeycomb-dataset' header. What did I do wrong? How do I fix this?"
-Missing Headers in Seattle
TL;DR: Go create a new environment in Honeycomb, and get a new API Key.
If you get this error when sending traces to Honeycomb, it means that you’re sending data, and your API Key is working, but…
Your API Key (in the
x-honeycomb-team header) tells Honeycomb where to put your traces. It specifies a team and an environment. Then, Honeycomb figures out which dataset to put each event in, based on the
service.name field in the event. Except…
Back in the day (before April 2022), Honeycomb didn’t look at events to figure out where to put them. It looked at a header instead, so right next to
x-honeycomb-dataset. All the events went in there together.
Back then, the concept of 'environment' didn’t exist in Honeycomb, so every team effectively only had one. That legacy environment is now called “Classic.” If you really want to send to it, populate that
x-honeycomb-dataset header. No guarantees on how long this will be supported.
Go to Honeycomb and create a new environment. Call it “prod” or “test” or “local-jessitron” according to where you’re running your app. When you use an API Key for that new environment, Honeycomb will figure out the dataset itself.
Caveat: if you’re sending metrics to Honeycomb, then you do need to send
x-honeycomb-dataset. Set it to “something-metrics” where “something” describes your setup.
Sneaky hint: When you look at the Honeycomb API Key in your
x-dataset-team header, you can tell it’s a Classic environment if it’s long (over 30 characters) and all lowercase hex digits. The up-to-date ones are shorter and have capital letters.
FYI: if you’re sending over GRPC, you might get status code 16. Over HTTP, this is a 401, OTLPExporterError: Unauthorized.
Dear Miss O11y, I want to make my microservices more observable. Currently, I only have logs. I’ll add metrics soon, but I’m not really sure...