Skip to content

Failure Store: Update go-docappender to respect failure store status #228

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

Merged
merged 23 commits into from
Feb 25, 2025

Conversation

1pkg
Copy link
Member

@1pkg 1pkg commented Jan 29, 2025

Description

This PR updates go-docappender to respect new failure store response status and emit new correspodning metrics accordingly. The old "indexed" metrics stay intact instead a new separate set of failure store labels is exposed.

This PR depends on changes made for BulkIndexerResponseItem in elastic/go-elasticsearch#948 and should only be merged afterwards.

How to test:

Use an instance of ES that has failure store feature enabled and enable failure store for a data stream via component template with.

POST _component_template/$name
{
  "template": {
    "data_stream_options": {
      "failure_store": {
        "enabled": true
      }
    }
  }
}

Set a custom "fail" ingest pipeline with.

PUT _ingest/pipeline/$name
{
  "processors": [
    {
      "fail": {
        "message": "fail"
      }
    }
  ]
}

Ingest some data to corresponding data stream, then check that failure store metrics are getting reported correctly.

To emulate "failed" status, set backing data stream index to be read only with.

PUT /$index/_settings
{
  "index.blocks.read_only": true
}
image

@1pkg 1pkg self-assigned this Jan 29, 2025
@1pkg 1pkg added the enhancement New feature or request label Jan 29, 2025
@elastic-observability-automation elastic-observability-automation bot added the safe-to-test Automated label for running bench-diff on forked PRs label Jan 29, 2025
@1pkg 1pkg marked this pull request as ready for review January 31, 2025 01:17
@1pkg 1pkg requested a review from a team as a code owner January 31, 2025 01:17
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Looks good! Just one question

@axw
Copy link
Member

axw commented Jan 31, 2025

One more question, sorry: should we be measuring "not_enabled" too?

@1pkg
Copy link
Member Author

1pkg commented Jan 31, 2025

One more question, sorry: should we be measuring "not_enabled" too?

Agree, this metric could be useful too. Updated to expose it in the last commit.

@1pkg 1pkg requested review from axw and a team January 31, 2025 19:46
@1pkg 1pkg requested a review from marclop February 12, 2025 18:12
@1pkg 1pkg requested a review from kruskall February 13, 2025 22:34
Copy link
Contributor

@marclop marclop left a comment

Choose a reason for hiding this comment

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

I think this looks good overall, just one small question

@1pkg 1pkg requested a review from marclop February 14, 2025 03:10
@1pkg 1pkg enabled auto-merge (squash) February 14, 2025 03:10
@1pkg 1pkg requested a review from simitt February 19, 2025 21:05
Copy link
Contributor

@marclop marclop left a comment

Choose a reason for hiding this comment

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

LGTM!

@1pkg 1pkg disabled auto-merge February 25, 2025 17:19
@1pkg 1pkg enabled auto-merge (squash) February 25, 2025 17:19
@1pkg 1pkg dismissed kruskall’s stale review February 25, 2025 17:20

The raised concerns were addressed.

@1pkg 1pkg merged commit df00985 into elastic:main Feb 25, 2025
5 checks passed
@1pkg 1pkg deleted the response_failure_store_support branch February 25, 2025 17:20
@rubvs rubvs mentioned this pull request Jun 17, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request safe-to-test Automated label for running bench-diff on forked PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants