Closed pyohannes closed 1 year ago
Here're the changes that would come with ECS alignment:
Network attribute renames as outlined for HTTP client spans https://github.com/open-telemetry/opentelemetry-specification/issues/3163#issuecomment-1423113532
Source and destination.
ECS does not have messaging-specific attributes, but it defines source
and destination
namespaces which describe low-level networking.
Also, ECS supports namespace reuse where namespace can be used as a root one, or under another namespace, such as process.entry_meta.source
. So in scope of ECS, messaging.source
should contain low-level network information.
Options:
messaging.destination
and messaging.source
.
messaging.destination
and foobar.destination
are different namespaces at the moment.source
and destination
for low-level network attributesentity
) to prevent future collisions.does proposal (2) move to a common attribute for both source/destination, e.g.
messaging.(source|destination).name
-> messaging.entity.name
is having a common attribute for both beneficial or problematic?
(and to throw another word into the salad, if I understand, maybe messaging.channel.name
...)
is having a common attribute for both beneficial or problematic?
I remember we discussed cases where having separate names for source
and destination
are benefical. E. g., there are cases where messages are published to queue "A", but are then routed and consumed from queue "B". So having two attributes messaging.destination.name="A"
and messaging.source.name="B"
might be useful for those scenarios.
Before going too deep into this discussion, we need to clarify whether we apply the ECS design principles of field reuse to OTel semantic conventions too. We also could say messaging.destination
and destination
are different things (that was the approach taken up to now, if I understand correctly). Otherwise we should make design principles for field reuse explicit for OTel semantic conventions.
I agree with @pyohannes , source
and destination
are well known terms for messaging and using a common (say entity
) would be a downgrade in the experience I'd say. Have we discussed if OTel will also adopt this "field reuse" from ECS? This may cause a lot of problems 🤔 .
Also, given ECS does not specify messaging fields, should they be looking into adapting and using what OTel has?
I agree with pyohannes , source and destination are well known terms for messaging
From a gut feeling I would agree, but is "source" actually commonly used?
Actually I like the word "channel" that @trask coined here.
Based on experience adopting source/destination in Azure SDK messaging SDKs and in Python contrib repos (https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1746) having two different names for the same attribute is hardish to implement:
messaging.destination.name
, then logs need to be aware on which side of the communication they areI don't see a benefit in having two separate namespaces to describe the same thing, but see a lot of minor problems and complications.
The only problem it solves is a (presumably) quite rare case when original destination and source are both available on the consumer (and different). Can we solve this case in a different way without making the general-case experience worse? E.g. we can add messaging.destination.original_name
or something like this.
Back to ECS alignment:
When we discussed source/destination asymmetry we did it partially because there was the same one for net/host on HTTP/gRPC, but with ECS alignment it would go away - #3402.
server.*
attributes would always describe the server side. Source/destination would be used for lower-level(ish) communication or to describe communication where client/server are not quite applicable.
So combined with arguments against using different terms for messaging queue/topic names, it would be great to pick a different name that would not be confusing or conflicting with ECS.
Consulting with bing chat we came to the following list of terms:
I'd like to bring it up and discuss at tomorrow's messaging SIG meeting.
@lmolkova So, if I got it right, the idea with aligning with ECS would be that we drop the distinction between "destination" and "source" and group everything into the same thing? With your points above about being hard to identify in instrumentation what is a "source" vs what is a "destination" is having one help with anything? How users visualizing things will be able to distinguish them?
How users visualizing things will be able to distinguish them?
Not sure what you mean here, can you expand on this?
In general, I think combining the span kind, the messaging.operation (if set) will usually tell you if something is put into or taken from a destination.
Note that the old OTel conventions also only used "destination".
Discussed in today's workgroup meeting:
_original
or .original
.destination
in ECS, as field re-use in ECS must be explicitly defined.I seem to remember during our sig meetings that we discovered a use for source
, but as we saw yesterday during the call, nobody could remember what the use case was.. so I guess if the need comes we have the original
route anyway 👍
What are you trying to achieve?
Make sure we are considering the impact of https://github.com/open-telemetry/oteps/pull/222 prior to marking the HTTP semantic conventions stable.
The messaging semantic conventions currently specifies attributes in the
messaging
namespace, and references attributes from thenet
namespace.Arguments from the
net
namespace are currently re-evaluated by the HTTP semantic convention workgroup, and decisions made there should be consistently applied for messaging too. Also, in line with decisions taken there, attributes in themessaging
namespace should be re-evaluated regarding alignment with ECS.Additional context.
See the similar issue for HTTP: #3163