Ask Miss O11y: Error: missing ‘x-honeycomb-dataset’ header

Ask Miss O11y: Error: missing ‘x-honeycomb-dataset’ header

2 Min. Read

“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…

illustration of one account with two teams; one team has a single environment and dataset. One team has two environments each with the same three datasets. x-honeycomb-team=(bunch of letters) points to one of those environments.
One Honeycomb account can have multiple teams. Each team can have several environments (such as “production” or “dev”). Each environment has a dataset for every service that has ever sent traces to it. The API key in the x-honeycomb-team header points to a team and environment.

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-team was 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.

Don’t forget to share!
Jessica Kerr

Jessica Kerr

Manager, Developer Relations

Jess is a symmathecist, in the medium of code. She sees development teams as learning systems made of people and running software. If we make that software teach us what’s happening, it’s a better teammate. And if this process makes us into systems thinkers, we can be better persons in the world.

Related posts