Closed qudongfang closed 4 years ago
Agree with that Events is import too. SaaS, like datadog
also provide events support.
And also, I'm prefer to add events to span object as property.
Here is an example in real word. I'm measuring the container startup time in K8s, one component is kubelet, the work node agent in K8s. The container startup process in one work node including pull image, create container and run the container, but we need not make all this step as separated spans, we can make it as one span including some events:
{
"service": "kubelet",
"operation": "start_pod",
"startTimestamp": "2019-07-05T19:17:55.961571091+08:00",
"duration": "3000",
"events": [
{
"level": "info",
"summary": "image nginx pulled",
"message": "Container image "nginx:1.17.0-alpine" already present on machine",
"timestamp: "2019-07-05T19:17:56.961571091+08:00",
},
{
"level": "info",
"summary": "container created",
"message": "Created container",
"timestamp: "2019-07-05T19:17:57.961571091+08:00",
},
... ...
],
... ...
}
To me, an Event is just a special case of a Trace, with 1 span.
To me, an Event is just a special case of a Trace, with 1 span.
Yeah. It is one way to look at it.
There are a few differences between Span(trace) and Event in my opinion.
Alternatively, could we treat events as special logs with a known structure?
Alternatively, could we treat events as special logs with a known structure?
Yes, We could.
At the same time, We can treat Logs as Spans(Trace) too. Why haven't we done that?
Bumping this up since it was referenced from #67.
What are Events if not just Logs?
Alternatively, could we treat events as special logs with a known structure?
Structured logs have been a thing for a long while. There is an RFC that defines how structured logs should be represented in text files [1] and AFAIK many modern logging backends support this format, in addition to other ways to ingest structured logs (e.g. as JSON).
On Windows the system and application logs are even called just that: Event Logs [2] and are structured.
So, the question is how are Events different from Logs? In what way?
[1] https://tools.ietf.org/html/rfc5424#page-15 [2] https://docs.microsoft.com/en-us/windows/win32/wes/windows-event-log
Yes, Events are Logs.
I feel that Logs are a special class of events, where the payload is just {time: "yyyy-mm-dd hh:mm:ss +Z", data: "entire log line goes here"}
I feel that Logs are a special class of events, where the payload is just {time: "yyyy-mm-dd hh:mm:ss +Z", data: "entire log line goes here"}
Call it "structured logging" then, where structured attributes can be associated.
Whether you want to call it events or logs, there isn't a reason to think of them separately.
Such as machine reboot, process core dump, deployment, a system kernel error, and even Java Exceptions.
All in logs.
The way I see it, metrics track events (and other things), while traces and logs describe events. It's events all the way down. I think it would be beneficial in making that relationship clear in the documentation.
I think this issue is not actionable as-is. Can it be closed?
I think this issue is not actionable as-is. Can it be closed?
I vote for closing for reasons I outlined above.
Closing this issue as it is non actionable and because there are existing reasons to do so.
In any case, feel free to re-open (or open a new issue) if you think this still needs to be addressed in some form.
It's 2022 - New Relic and Datadog (arguably two of the most dominant APM players) have well defined and separate APIs and documentation for events.
I think OTEL should catch up with the industry and add events
as a first class citizen.
An event is not a tracing span because events can be emitted regardless of a user tracing session. For example, an upgrade event: "The system was upgraded to v1.2.3" with a bunch of supporting information, all in a well defined schema.
To those that say events are logs, logs are unstructured and events are structured. APMs have different APIs for events. Treating events as logs is not helpful at all when integrating with Datadog, for example. Events are also not tracing spans with one span. That is one implementation method. The logical definition of events is different from traces.
https://docs.newrelic.com/docs/data-apis/understand-data/new-relic-data-types/#event-data https://docs.datadoghq.com/events/
@scheler Thanks. Is there an exporter of events (as events, not logs) into Datadog or New Relic APMs?
Speaking for New Relic, we accept OpenTelemetry data via OTLP. From OTLP's perspective, both logs and events use the log data model, and that's fine with us. We're currently working on a strategy that would treat OpenTelemetry events in a similar way as New Relic events are treated today. Can't provide specifics quite yet.
To those that say events are logs, logs are unstructured and events are structured.
Opentelemetry logs (or the thing it calls logs) are in fact structured.
As we stated:
In software, observability typically refers to telemetry produced by services and is divided into three major verticals:
Logging provides insight into application-specific messages emitted by processes. These verticals are tightly interconnected. Metrics can be used to pinpoint, for example, a subset of misbehaving traces. Logs associated with those traces could help to find the root cause of this behavior. And then new metrics can be configured, based on this discovery, to catch this issue earlier next time.
I think we should consider Events as one of the major verticals in open-telemetry too. Such as machine reboot, process core dump, deployment, a system kernel error, and even Java Exceptions.
Products like sentry and cloudtrail.
https://en.wikipedia.org/wiki/Event_monitoring