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

Fix otlp consumer interface; Add otlp partial success error message #172

Merged
merged 6 commits into from
Oct 19, 2023

Conversation

carsonip
Copy link
Member

#156 broke the otlp consumer interface. Fix it and add tests.

@carsonip carsonip requested a review from a team as a code owner October 18, 2023 11:09
@carsonip carsonip requested review from axw and kruskall October 18, 2023 11:10
simitt
simitt previously approved these changes Oct 18, 2023
return ConsumeMetricsResult{
RejectedDataPoints: remainingDataPoints,
ErrorMessage: errMsg,
Copy link
Member Author

Choose a reason for hiding this comment

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

Overloading this PR to add one missing element in #156 , which is to return an error message along with the rejected count. According to the spec, it MUST return a rejected count and SHOULD return a message. For the sake of simplicity and that we do not have any guarantees about the stability of the Consume*WithResult interface, we'll just have a string in Consume*Result struct instead of private fields + public methods.

In reality, currently, this ErrorMessage field is only non-empty when metrics rejected count > 0. The "unsupported data points" is not extremely helpful, but still better than nothing.

@carsonip carsonip merged commit a0f7950 into elastic:main Oct 19, 2023
3 checks passed
@carsonip carsonip changed the title Fix otlp consumer interface breaking change Fix otlp consumer interface; Add otlp partial success error message Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants