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

Decide if semantic conventions require that attribute names across all areas should be unique #815

Closed
tigrannajaryan opened this issue Aug 17, 2020 · 13 comments · Fixed by #832
Assignees
Labels
area:semantic-conventions Related to semantic conventions priority:p2 Medium priority level release:required-for-ga Must be resolved before GA release, or nice to have before GA spec:miscellaneous For issues that don't match any other spec label

Comments

@tigrannajaryan
Copy link
Member

tigrannajaryan commented Aug 17, 2020

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected). It is not clear if the attribute names across all convention areas should be globally unique.

Raised here #807 (comment)

This needs to be resolved before GA since otherwise if there are any conflicts we won't be able to fix it in backward compatible manner.

@tigrannajaryan tigrannajaryan added spec:miscellaneous For issues that don't match any other spec label area:semantic-conventions Related to semantic conventions labels Aug 17, 2020
@tigrannajaryan tigrannajaryan added the release:required-for-ga Must be resolved before GA release, or nice to have before GA label Aug 17, 2020
@tigrannajaryan tigrannajaryan self-assigned this Aug 17, 2020
@yurishkuro
Copy link
Member

I would agree with that, because we need to target the lowest common denominator backends that do not make structural distinction between resource and span attributes. For example, in Zipkin span every attribute will be in a single flat list, while Jaeger span can structurally distinguish resource and span attributes (but not attributes from multiple/hierarchical resources, if we had them).

tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Aug 19, 2020
…antic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry#815
@jmacd
Copy link
Contributor

jmacd commented Aug 19, 2020

I strongly support the proposal that attribute and label names should have the same interpretation across OpenTelemetry. I expect that finished Span will be translated into Metric events, for example, where (a subset of) span attributes become metric labels.

@gfuller1
Copy link
Contributor

For the case where spans get converted to metric events, if you have http.status_code where it's stored as an integer on a span but metric labels don't support integers, we'd have to rename it since a string and an int aren't the same interpretation. In this case there doesn't seem like a clean way to rename the attribute. Something like http.status_code_str looks tacky and will most likely lead to confusion for users when querying.

What would you suggest for cases like this? I don't see a good way around it.

Context: #739

tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Aug 19, 2020
…antic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry#815
@tigrannajaryan
Copy link
Member Author

@gfuller1 it is indeed a problem. A few possible solutions:

  1. Allow non-string metric label values. Probably a no go since it complicates Metric API and OTLP (and I am not sure other metric protocols can support this).

  2. Carve an exception in attribute-metric rules to allow the data type of the value to be different if the recording medium does not support a particular data type. In this case the meaning of http.status_code label is still exactly the same as the meaning of http.status_code span attribute, but due to inability to record integer values we allow the string representation to be recorded in the metric label. The semantics remain the same. I think this is a reasonable exception but would like opinions about what can go wrong if we do this.

@gfuller1
Copy link
Contributor

@tigrannajaryan for 1. I've heard that a lot of thought went into the decision for that around performance and other things so I agree that's a no go. For 2. I imagine querying backends could cause issues. If you want to see all events that have http.status_code=200 then without some complications it'll only return span events. Backends could do that conversion on their side but that would be a hassle to parse every string value of a label and check if it COULD be converted to a string. That's the main problem I can think of off the top of my head but I'm not in the ingest code at all so there might be other problems.

I'm curious what the benefits are to span attribute values being string or numeric.

@gfuller1
Copy link
Contributor

I strongly support the proposal that attribute and label names should have the same interpretation across OpenTelemetry. I expect that finished Span will be translated into Metric events, for example, where (a subset of) span attributes become metric labels.

@jmacd how would you handle the above case for your scenario?

@tigrannajaryan
Copy link
Member Author

I'm curious what the benefits are to span attribute values being string or numeric.

Numeric attributes would normally make sense if you want to do any sort of arithmetic, aggregation. Obviously that's pointless for HTTP status codes, but can be quite meaningfull for other attributes. I am open to changing http.status_code convention to be a string for Spans as well. Can't think of downsides at the moment.

@jkwatson
Copy link
Contributor

jkwatson commented Aug 19, 2020

for status codes, having a numeric value does let you find ranges (>= 200 AND < 300, for instance)

@tigrannajaryan
Copy link
Member Author

@jkwatson that's a good point. Arguably that should also work with strings: >= "200" AND < "300" (all status codes are 3 digit so lexicographic ordering coincides with numeric ordering).

@jkwatson
Copy link
Contributor

I wonder how many metric query engines support that kind of lexigraphic order querying?

@tigrannajaryan
Copy link
Member Author

I wonder how many metric query engines support that kind of lexigraphic order querying?

Minor correction: not "metric engines" but "tracing engines" since we are discussing the possibility to change the data type of "http.status_code" span attribute from integer to string.

Your question is still valid, but I don't think we need to worry about it. OpenTelemetry introduces so much that there is a lot of other opportunities to implement nice features for engine vendors anyway.

@jkwatson
Copy link
Contributor

I wonder how many metric query engines support that kind of lexigraphic order querying?

Minor correction: not "metric engines" but "tracing engines" since we are discussing the possibility to change the data type of "http.status_code" span attribute from integer to string.

Heh. I keep forgetting New Relic is probably unique in that it's the same query engine for both. :) You are correct, though!

@andrewhsu andrewhsu added the priority:p2 Medium priority level label Aug 21, 2020
bogdandrutu added a commit that referenced this issue Aug 24, 2020
…antic convention areas (#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: #815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
@justinfoote
Copy link
Member

I've recently made a proposal that has some overlap with this discussion: #855

If we dictate something like this:

Identical namespaces or names in all these areas MUST have identical meanings.

I think it makes sense that there is a single canonical source for the meanings of names.

jack-berg pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 7, 2023
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
AlexanderWert pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 10, 2023
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
jack-berg pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
jack-berg pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
jsuereth pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
jsuereth pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
jsuereth pushed a commit to open-telemetry/semantic-conventions that referenced this issue Nov 16, 2023
…antic convention areas (#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
jsuereth pushed a commit to open-telemetry/semantic-conventions that referenced this issue Nov 16, 2023
…antic convention areas (#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
joaopgrassi pushed a commit to dynatrace-oss-contrib/semantic-conventions that referenced this issue Jan 10, 2024
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
joaopgrassi pushed a commit to dynatrace-oss-contrib/semantic-conventions that referenced this issue Jan 10, 2024
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
pyohannes pushed a commit to pyohannes/semantic-conventions that referenced this issue Jan 17, 2024
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
pyohannes pushed a commit to pyohannes/semantic-conventions that referenced this issue Jan 17, 2024
…antic convention areas (open-telemetry#832)

* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: open-telemetry/opentelemetry-specification#815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions priority:p2 Medium priority level release:required-for-ga Must be resolved before GA release, or nice to have before GA spec:miscellaneous For issues that don't match any other spec label
Projects
None yet
7 participants