LogRecord attributes are special - they support complex attribute types unlike spans/metrics/resources that support standard attributes only (primitives and arrays of primitives). Note that the latter is the API limitation (not an OTLP one)
In semconv we assume that all attributes are cross-signal and therefore are limited to 'standard' attribute types.
The proposal is to lift this limitation and allow defining complex attributes in semantic conventions with the following limitations:
- they cannot be referenced on spans, metrics, or resources/entities. TBD: check with profiles
- this can be solved via the semconv policy (given that attribute types are limited on the OTel API surface and not the protocol, we might not want to hardcode it in weaver)
- we should define if/how such attributes would interact with the standard attributes. E.g. are
geo.location.lat=x and geo.location.lon=y attributes set on a span equivalent to geo.location={"lat": x, "lon": y} set on the log record?
This would help with the following problems:
Related: open-telemetry/opentelemetry-specification#4334, open-telemetry/opentelemetry-specification#2888
LogRecord attributes are special - they support complex attribute types unlike spans/metrics/resources that support standard attributes only (primitives and arrays of primitives). Note that the latter is the API limitation (not an OTLP one)
In semconv we assume that all attributes are cross-signal and therefore are limited to 'standard' attribute types.
The proposal is to lift this limitation and allow defining complex attributes in semantic conventions with the following limitations:
geo.location.lat=xandgeo.location.lon=yattributes set on a span equivalent togeo.location={"lat": x, "lon": y}set on the log record?This would help with the following problems:
Related: open-telemetry/opentelemetry-specification#4334, open-telemetry/opentelemetry-specification#2888