-
Notifications
You must be signed in to change notification settings - Fork 102
[APM] APM uses non-standard var types #1011
Comments
@simitt are you the best POC to tag for this? |
If we make this change in Kibana I think we should check all packages, and maybe add some package validation so that no new unsupported |
Closing the loop re: validation (thanks @ycombinator!), there is validation for var types in @simitt Has |
Thanks for catching this @jen-huang! I don't believe that this check has ever been run on APM packages. |
@simitt Could you please elaborate more on deciding not to use the elastic-package for package development? I'm afraid that it may lead to further inconsistencies in the future. I wonder if it's because the tool is not feasible for your use case or there is a different reason. |
We create the package from apm-server because it is much simpler, as we can import apm-server packages (I mean This way there is a single source of truth and the apm package is always up to date for each corresponding stack version. Here apm differs again because we intend to follow stack versioning, so the workflow you propose is not really optimal for us... TBH, I am a bit confused by all the fragmentation in this space, it is not clear what belongs where and it is hard to discover and be up to date with new developments if one is not part of the team. The package-registry for instance runs some validations when building, and some more when booting up (afaik). Why I am worried that a wrong type can go unnoticed for so long - that means that |
The supported (and recommended) workflow starts in integrations (elastic-package runs as part of CI), then packages are synced with package-storage. You're using package-registry directly which is not recommended by us for Integrations developers.
There is already a single source of truth - elastic-package tool and the package spec it embeds.
It's because of the fact that you shouldn't interact with package registry directly. It's an internal implementation detail. There is no validation in package-registry, as packages coming from integrations are already verified and stable. Regarding packages pushed directly to the package-storage, we have a plan to enable the cc @ycombinator |
* [fleet] Fix apm package types fixes #elastic/package-storage#1011
When the apm package started we had the discussion on where this package should be. Already then my opinion was that it should be part of integrations because of all the benefits you get with it. When the development of the apm package started the recommended way was already not to use package-registry directly and referred to https://github.com/elastic/integrations/blob/master/CONTRIBUTING.md docs on how to build packages. This guide has grown over the past few months and I strongly recommend to have a look again. I understand that there are benefits of having the package directly in the apm-server repo. But I think the benefits of being in the integrations repo with all the automation outweights the downsides (my opinion). At the same time, being part of the integrations repo is not a requirement which is a feature. Anyone can build packages where the best place is for it. In any case, I strongly recommend to use elastic-package as that is what we build it for. @mtojek @ycombinator Do we run these validations on packages pushed to package-storage? |
Currently we do not but it's clear that we need to. I've filed an issue to implement it: #1013. |
Personally I think it's a good thing that the So I'm okay with the |
I agree that we should be using As for which repo the package should be in: I still think having it in apm-server makes most sense, since we're maintaining both an integration package and old-style fields.yml, pipelines, etc. for running apm-server standalone (i.e. a beat). We regularly add fields and modify our ingest pipeline which need to be made for both, and these are also typically coupled with changes in the APM Server code. As @jalvz said above, our intention is for the APM package to be aligned with the stack version -- changes in the package and code would be versioned together, and need to be tested together. How we're working today is:
Once the old-style standalone apm-server mode is no longer supported, we would move to updating the integration package directly. In theory we could then manage it in the integrations repo, but I think it would still make sense to co-locate it with the APM Server code to simplify development and testing.
@mtojek Juan was referring to a single source of truth for the APM fields, ingest pipelines, etc. Maintaining the package externally to apm-server would require a much more concerted effort to keep them in sync. I hope this clarifies things - please reach out on Slack if you still have concerns. |
Interesting points @ycombinator around having it in a separate repository. I agree it might even benefit us to make sure elastic-package can be used independent of For me the take aways are:
|
Just a small clarification: I'm not suggesting we do that, I was just saying it would be a little less painful after we no longer have to maintain standalone as well as Fleet-managed apm-server. I think it would still be a pain to have the package and code in separate repos, since it would make it more difficult to develop and test changes that involve changing both. Anyway, we agree on the key takeaways. |
Fixed in #1012 |
(Not sure where to file this bug as I didn't see APM package in integrations repo)
This came up from PR elastic/kibana#93585 (comment): it seems that APM is using var types that are not part of the package spec:
https://github.com/elastic/package-storage/blob/snapshot/packages/apm/0.1.0-dev.7/manifest.yml#L44-L136:
Package spec defines these types: https://github.com/elastic/package-spec/blob/master/versions/1/data_stream/manifest.spec.yml#L50-L55
Kibana has conditional logic in a few places depending on the var type, so it is very important that Kibana knows about all the possible var types that a package can contain.
It seems like APM package needs to update
string
totext
andint
tointeger
.The text was updated successfully, but these errors were encountered: