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 value for all constant-keyword fields in the apm package #12159

Closed
simitt opened this issue Dec 5, 2023 · 7 comments · Fixed by #12219
Closed

Define value for all constant-keyword fields in the apm package #12159

simitt opened this issue Dec 5, 2023 · 7 comments · Fixed by #12219
Assignees
Milestone

Comments

@simitt
Copy link
Contributor

simitt commented Dec 5, 2023

The apm package defines fields of type constant_keyword in several places. Some of these fields have a fixed value set already in the template definition; others do not. This is generally supported by ES, but causes problems in combination with how Fleet handles mapping updates and rollovers, see details in elastic/elasticsearch#102829. Solving this in Fleet would add undesired complexity, therefore it was suggested to instead require more restrictive behaviour via the package spec, by requiring a value to be defined for constant keyword types (elastic/kibana#178528).

We need to update the apm-package to define values for all of these fields. This includes changing the package generation logic for the interval based templates (https://github.com/elastic/apm-server/blob/main/apmpackage/cmd/genpackage/main.go#L62).

@carsonip
Copy link
Member

carsonip commented Feb 1, 2024

TODO: port the change to https://github.com/elastic/integrations/tree/main/packages/apm after testing in 8.12.1

The change isn't going out in 8.12.1. It is now planned for 8.12.2.

@carsonip
Copy link
Member

carsonip commented Feb 5, 2024

integrations PR: elastic/integrations#9055

@carsonip
Copy link
Member

carsonip commented Feb 6, 2024

For an equiv change in ES apm-data plugin, since the component template mappings are shared between intervals e.g. for service_summary, to specify the value will require duplicating the mappings to 1m, 10m and 60m versions of component templates for each of the aggregated metrics. I'm not familiar with the implications in terms of plugin upgrade when we add / remove component templates. Let me know if we want to proceed and I'll make the changes.

cc @axw @simitt

@axw
Copy link
Member

axw commented Feb 7, 2024

The issue that prompted us to specify constant_keyword values is not relevant to the apm-data plugin; it is only relevant to Fleet, due to the way it attempts to update mappings for backing indices. The ES plugin will just update the component template and perform a rollover.

@carsonip
Copy link
Member

carsonip commented Feb 7, 2024

The issue that prompted us to specify constant_keyword values is not relevant to the apm-data plugin

Sorry for not making it clear enough. Yes, that also came up in the discussion with @simitt , and we wanted to align the ES plugin and the integrations package, i.e. bringing back changes. @simitt do you still think it is worth it to do so?

@simitt
Copy link
Contributor Author

simitt commented Feb 7, 2024

If it is not required in the plugin for full functionality, we can also keep the plugin as is and consider this done with the changes merged and bundled for the Fleet apm package.

@carsonip
Copy link
Member

carsonip commented Feb 8, 2024

Thanks for confirming.

Closing as #12219 and elastic/integrations#9055 are merged.

@carsonip carsonip closed this as completed Feb 8, 2024
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 a pull request may close this issue.

3 participants