-
Notifications
You must be signed in to change notification settings - Fork 888
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
Clarify what to do on non-reversible telemetry schema downgrades #3727
Comments
This is explicitly mentioned in the OTEP:
IMO we should explicitly state this as part of the rules that govern what changes we allow on semantic conventions, and also specify the behavior for backends/processors that support this when running into this edge case. |
Relates to #2680 (for questions 1 and 3, 2 is not addressed by it) |
The problem actually runs much deeper. Given a simple non-conflicting transformation:
So basically, any transformation that transform an attribute key to another already existing attribute key is practically non-reversible. |
We have a couple options:
When a non-reversible change happens the Collector can't transform the schema to the previous version. The simplest approach is to detect and do nothing. The data remains unchanged and the SchemaURL remains the same as it was. Whoever is the consumer of the data will have to deal with the fact that the Collector may leave some of the data untransformed. |
Good observation. The opposite case of this is already covered by a prohibiting policy here. |
On the specification for telemetry schemas an example is provided where a piece of telemetry is downgraded from 1.2.0 to 1.1.0 or upgraded from 1.0.0 to 1.1.0. It is therefore implicit in the example that telemetry schemas transformations must allow both upgrades and downgrades.
However, the currently published 1.8.0 transformation rules do not allow for an unambiguous downgrade, at least with the information in the schema file:
opentelemetry-specification/schemas/1.21.0
Lines 123 to 129 in 7b6de1f
Here, two attributes,
db.cassandra.keyspace
anddb.hbase.namespace
were merged intodb.name
, and therefore in the presence of telemetry data usingdb.name
with a schema newer than 1.7.0 it is not possible to determine how to downgrade this attribute to 1.7.0 or lower. Note that it may be possible to do such downgrade by considering the value ofdb.system
, but this is not specified in the schema file.This kind of two-to-one renaming also does not seem to be explicitly forbidden by the specification:
opentelemetry-specification/specification/versioning-and-stability.md
Lines 233 to 239 in 4229197
since this change can be described by a telemetry schema file, even if it is not reversible (this relates to #3513).
There are therefore three open questions:
The text was updated successfully, but these errors were encountered: