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 observability requirements for stable components #11772

Merged
merged 12 commits into from
Dec 16, 2024
68 changes: 68 additions & 0 deletions docs/component-stability.md
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,74 @@ Stable components MUST be compatible between minor versions unless critical secu
component owner MUST provide a migration path and a reasonable time frame for users to upgrade. The same rules from beta
components apply to stable when it comes to configuration changes.

#### Observability requirements
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved

Stable components should emit enough internal telemetry to let users detect errors, as well as data
loss and performance issues inside the component, and to help diagnose them if possible.

The internal telemetry of a stable component should allow observing the following:
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved

1. How much data the component receives.

For receivers, this could be a metric counting requests, received bytes, scraping attempts, etc.
mx-psi marked this conversation as resolved.
Show resolved Hide resolved

For other components, this would typically be the number of items (log records, metric points,
spans) received through the `Consumer` API.

2. How much data the component outputs.

For exporters, this could be a metric counting requests, sent bytes, etc.

For other components, this would typically be the number of items forwarded through the `Consumer`
API.

3. How much data is dropped because of errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @djaglowski 's RFC here I think this would just be an attribute on the output metric called outcome? I can see the value in having a separate metric for errors, but want to be sure we don't create a divergence from the RFC. Separately, should we link the RFC from Dan to also specify the previously agreed upon naming conventions?

Copy link
Contributor Author

@jade-guiton-dd jade-guiton-dd Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to require the use of the RFC's conventions for component-identifying attributes, and I will definitely include using an outcome attribute on the input metric instead of a separate error metric as a recommended implementation for processors.

However, if we want to incentivize contributing external components, I don't think we want to require strict adherence to all of the RFC's choices, so divergences are somewhat inevitable. Relatedly, have you read the "Important note" about the RFC in the PR description? I'm interested in hearing what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @djaglowski 's RFC here I think this would just be an attribute on the output metric called outcome?

That would be the most natural way to go about this. I feel like this document should not be too prescriptive as to how to accomplish the requirements listed, but making a recommendation like this would make sense to me to ensure consistency across components.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jade-guiton-dd I hadn't seen that yet, thanks for bringing my attention to it, i think i had only seen the initial description.

I would strongly advise against option 1 as error back propagation is key if you are running a collector in gateway mode and you want to propagate backpressure to an agent. I think options 2 or 3 are sufficient, option 4 feels not prescriptive enough IMO.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is the recommendation for a component, it makes sense to have the component author use a custom error metric that they can decide to either include or exclude any downstream errors as part of it. (this is what you have written, and i agree with it 😄)

Copy link
Contributor Author

@jade-guiton-dd jade-guiton-dd Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they can decide to either include or exclude any downstream errors as part of it. (this is what you have written, and i agree with it 😄)

To be clear, the current requirements allow including downstream errors in a custom error metric, but only if there is a way to distinguish them from internal errors.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this makes sense to me. Thank you! 🙇

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure @djaglowski, do you support option 2 I detailed in the PR description, ie. amending the Pipeline Instrumentation RFC to require the implementation to distinguish errors coming directly from the next pipeline component from errors propagated from components further downstream, in order to fit the last paragraph of point 3?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense in principal, as long as there is a clear mechanism for communicating this information so that instrumentation that is automatically wrapped around components can unambiguously know the correct outcome.


For receivers, this could include a metric counting payloads that could not be parsed in.

For receivers and exporters, this could include a metric counting requests that failed because
of network errors.
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved

The goal is to be able to easily pinpoint the source of data loss in the Collector pipeline, so
this should either:
- only include errors internal to the component, or;
- allow distinguishing said errors from ones originating in an external service, or propagated
from downstream Collector components.

4. Details for error conditions.

This could be in the form of logs or spans detailing the reason for an error. As much detail as
necessary should be provided to ease debugging. Processed signal data should not be included for
security and privacy reasons.

5. Other discrepancies between input and output. This may include:

- How much data is dropped as part of normal operation (eg. filtered out).

- How much data is created by the component.

- How much data is currently held by the component (eg. an UpDownCounter keeping track of the
size of an internal queue).

6. Processing performance.

This could be a histogram of end-to-end component latency, measured as the time between external
requests or `Consumer` API calls.
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved

When measuring amounts of data, counting data items (spans, log records, metric points) is
recommended. Where this can't easily be done, any relevant unit may be used, as long as zero is a
reliable indicator of the absence of data. In any case, the type of all metrics should be properly
documented (not "1").
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved

If data can be dropped/created/held at multiple distinct points in a component's pipeline (eg.
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved
scraping, validation, processing, etc.), it is recommended to define additional attributes to help
diagnose the specific source of the discrepancy, or to define different signals for each.

Note that some of this internal telemetry may already be provided by pipeline auto-instrumentation,
or helpers modules (such as `receiverhelper`, `scraperhelper`, `processorhelper`, or
`exporterhelper`). Please check the documentation to verify which parts, if any, need to be
implemented manually.
jade-guiton-dd marked this conversation as resolved.
Show resolved Hide resolved

### Deprecated

The component is planned to be removed in a future version and no further support will be provided. Note that new issues will likely not be worked on. When a component enters "deprecated" mode, it is expected to exist for at least two minor releases. See the component's readme file for more details on when a component will cease to exist.
Expand Down
Loading