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

Define compatibility between cloud events and OpenTelemetry events #3768

Closed
jack-berg opened this issue Nov 15, 2023 · 7 comments
Closed

Define compatibility between cloud events and OpenTelemetry events #3768

jack-berg opened this issue Nov 15, 2023 · 7 comments
Assignees
Labels
spec:logs Related to the specification/logs directory triage:deciding:needs-info Not enough information. Left open to provide the author with time to add more details

Comments

@jack-berg
Copy link
Member

CloudEvents is a popular standard for describing event data. OpenTelemetry defines an Event API and has an active Event working group to resolve some of the outstanding issues related to the Event API / SDK and Events in semantic conventions.

Similar to the compatibility documents we provide for Prometheus / OpenMetrics, OpenCensus, and OpenTracing, we should provide a compatibility document describing how CloudEvents interoperate with OpenTelemetry Events.

We should be careful to ensure that any work done with the Event API / SDK and Events in the semantic conventions does not prevent interoperability with CloudEvents.

Additional context:

@jack-berg jack-berg added the spec:logs Related to the specification/logs directory label Nov 15, 2023
@jack-berg jack-berg moved this to Todo in Logs SIG Nov 15, 2023
@jack-berg jack-berg assigned jack-berg and unassigned arminru Nov 15, 2023
@pyohannes
Copy link
Contributor

There are already semantic conventions for tracing the flow of CloudEvents, which are build on a Distributed Tracing extension that is part of CloudEvents.

It might be necessary to consider (and maybe re-work) this when defining a consistent relationship between OpenTelemetry events and CloudEvents.

@tedsuo
Copy link
Contributor

tedsuo commented Mar 28, 2024

I suggest that this issue be moved to semantic conventions. There are no compatibility issues.

The difficult design work involved collaborating with CloudEvents to design tracing for messaging systems. Structurally, CloudEvents are flat. All CloudEvents metadata can be mapped directly to attributes using the cloudevent namespace. CloudEvent data maps directly to the payload. There are a handful of CloudEvent attributes which have not yet been added to semantic conventions, but I do not see any additional design work as necessary at this time. CloudEvents which do not have a tracing context must be stored as events, but otherwise they are no different than CloudEvents stored as spans.

There is one important note. While it is straightforward for OpenTelemetry receive CloudEvents, it is not guaranteed that all telemetry received by OpenTelemetry can be converted into CloudEvents. OpenTelemetry intends to collect the widest range of telemetry available. OpenTelemetry is not intended to function as an application component that produces CloudEvents as part of the data plane of a distributed system. In practice, this means that OpenTelemetry can accept data which may be missing information required by the CloudEvents specification. Specifically, we do not require that end users to provide a unique id, a source URI-reference, a CloudEvents specversion, or a type.

@tedsuo
Copy link
Contributor

tedsuo commented Mar 29, 2024

One other subject that should be addressed is integration at the instrumentation level. CloudEvents provides SDKs in many languages, which are how they expect CloudEvent users to interact with the project. I don't think there are any plans to merge the projects and retire the CloudEvents SDKs, there is much more functionality in the CloudEvents SDKs than in OTel's simple API for sending events as telemetry,

For these reasons, I don't believe that we should add any CloudEvent functionality to the Otel API, or otherwise encourage CloudEvent users to abandon the CloudEvent SDKs in favor of the Otel SDKs. They are much better equipped to keep up with the needs of their project than we are.

Integration between OTel and CloudEvents could be as simple as the CloudEvents SDK calling the Otel Event API under the hood. When Otel is not installed, the API call is a no-op. When OTel is installed, CloudEvents will automatically be integrated with any OTel instrumentation that is running in the application. That should be sufficient.

@pyohannes
Copy link
Contributor

For these reasons, I don't believe that we should add any CloudEvent functionality to the Otel API, or otherwise encourage CloudEvent users to abandon the CloudEvent SDKs in favor of the Otel SDKs.

💯 The scope of CloudEvents is much larger than that of OTel events. While the latter are restricted to telemetry, CloudEvents aims at supporting any workflows that involve events, see here:

CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems.

I assume we don't want OTel Event APIs to emit events that are used to control some business logic.

@MSNev MSNev moved this from Todo to Related in Logs SIG Apr 19, 2024
@jack-berg jack-berg added the triage:deciding:needs-info Not enough information. Left open to provide the author with time to add more details label Apr 19, 2024
@tigrannajaryan
Copy link
Member

@tedsuo @MSNev do you want to keep this open? If so let me know who is going to the assignee.

@MSNev
Copy link
Contributor

MSNev commented Apr 19, 2024

We just decided that from the "event WG" perspective that this was not in scope (which is why we removed it from our board).

As the definition of a specific "event" would be for the event domain "owners" to specify in this case that would be someone who wants to create a bridge from Cloud Events to OTel. So we don't have anyone specific to be the assignee.

@tigrannajaryan
Copy link
Member

Can we close this issue?

@trask trask closed this as completed Jul 16, 2024
@github-project-automation github-project-automation bot moved this from Related to Done in Logs SIG Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:logs Related to the specification/logs directory triage:deciding:needs-info Not enough information. Left open to provide the author with time to add more details
Projects
Status: Done
Development

No branches or pull requests

7 participants