influxdata / influxdata/influxdb-observability
Exemplars should treat trace_id and span_id as fields instead of tags.
- Dominant language
- Go
- Stars
- 56
- Forks
- 29
- Avg merge
- 12d 13h
- Merged PRs (30d)
- 4
Description
We recently deployed auto instrumentation of the python `requests` library to one of our services, and noticed that this caused our cardinality within Influx to explode. We traced the issue down to the metric `http.client.duration_exemplar`, and the two tags `trace_id` and `span_id`. Since the trace id and span id are unique values, I think that treating them as tags is violating the [recommended schema design](https://docs.influxdata.com/influxdb/cloud/write-data/best-practices/schema-design/#use-fields-for-unique-and-numeric-data), and they should be set as fields instead.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the code that emits the http.client.duration_exemplar metric and inspect how trace_id and span_id are classified. Compare the current schema with InfluxDB’s guidance on unique values; done means both identifiers are written as fields rather than tags without losing exemplar data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, python
- Domain
- databases, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100