You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rfcs/component-universal-telemetry.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -90,17 +90,17 @@ The location of these measurements can be described in terms of whether the data
90
90
component to which the telemetry is attributed. Metrics which contain the term "produced" describe data which is emitted from the component,
91
91
while metrics which contain the term "consumed" describe data which is received by the component.
92
92
93
-
For both metrics, an `outcome` attribute with possible values `success`, `failure`, and `refused` should be automatically recorded,
93
+
For both metrics, an `otelcol.component.outcome` attribute with possible values `success`, `failure`, and `refused` should be automatically recorded,
94
94
based on whether the corresponding function call returned successfully, returned an internal error, or propagated an error from a
95
95
component further downstream.
96
96
97
97
Specifically, a call to `ConsumeX` is recorded with:
98
-
-`outcome = success` if the call returns `nil`;
99
-
-`outcome = failure` if the call returns a regular error;
100
-
-`outcome = refused` if the call returns an error tagged as coming from downstream.
98
+
-`otelcol.component.outcome = success` if the call returns `nil`;
99
+
-`otelcol.component.outcome = failure` if the call returns a regular error;
100
+
-`otelcol.component.outcome = refused` if the call returns an error tagged as coming from downstream.
101
101
After inspecting the error, the instrumentation layer should tag it as coming from downstream before returning it to the parent component.
102
102
103
-
The upstream component which called `ConsumeX` will have this `outcome` attribute applied to its produced measurements, and the downstream
103
+
The upstream component which called `ConsumeX` will have this `otelcol.component.outcome` attribute applied to its produced measurements, and the downstream
104
104
component that `ConsumeX` was called on will have the attribute applied to its consumed measurements.
105
105
106
106
Errors should be "tagged as coming from downstream" the same way permanent errors are currently handled: they can be wrapped in a `type downstreamError struct { err error }` wrapper error type, then checked with `errors.As`. Note that care may need to be taken when dealing with the `multiError`s returned by the `fanoutconsumer`. If PR #11085 introducing a single generic `Error` type is merged, an additional `downstream bool` field can be added to it to serve the same purpose instead.
0 commit comments