Skip to content

[Tracing] Consistent span attribute key for CloudEvent id #4578

@pierDipi

Description

@pierDipi

MTBroker filter and ingress use messaging.message_id:

MessagingMessageIDAttributeName = "messaging.message_id"
)
var (
MessagingSystemAttribute trace.Attribute = trace.StringAttribute(MessagingSystemAttributeName, "knative")
MessagingProtocolHTTP trace.Attribute = MessagingProtocolAttribute("HTTP")
)
func MessagingProtocolAttribute(protocol string) trace.Attribute {
return trace.StringAttribute(MessagingProtocolAttributeName, protocol)
}
func MessagingMessageIDAttribute(ID string) trace.Attribute {
return trace.StringAttribute(MessagingMessageIDAttributeName, ID)
}

and the dispatcher uses cloudevents.id:

if id != nil {
idParsed, err := types.Format(id)
if err != nil {
return err
}
span.AddAttributes(trace.StringAttribute("cloudevents.id", idParsed))
}

Expected Behavior

Consistently use one of them because using both is confusing.

Additional context


Which one do we want to choose?

/area observability

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/conformancearea/observabilitykind/bugCategorizes issue or PR as related to a bug.kind/good-first-issueDenotes an issue ready for a new contributor.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions