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

[RFC] Faas fields - stage 1 #1542

Merged
merged 8 commits into from
Aug 19, 2021
Merged

Conversation

AlexanderWert
Copy link
Member

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • For proposing substantial changes or additions to the schema, have you reviewed the RFC process?
  • If submitting code/script changes, have you verified all tests pass locally using make test?
  • If submitting schema/fields updates, have you generated new artifacts by running make and committed those changes?
  • Is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • Have you added an entry to the CHANGELOG.next.md?

@ebeahan
Copy link
Member

ebeahan commented Aug 3, 2021

Stage 1 criteria

  • Opened pull request for this proposal revising the existing strawperson
  • Identified “sponsor” at Elastic who will participate in RFC process and take ownership of the change after the process completes
  • Outlined initial field definitions
  • High-level description of examples of usage
  • High-level description of example sources of data
  • Identified potential concerns and implementation challenges/complexity
  • Subject matter experts identified and weighed in on the high level utility of these changes in the pull request
  • ECS team weighed in on appropriateness of these changes in the pull request


### Nesting `cloud.*` and `service.*` fields under `_.origin.*` and `_.target.*`
We identified a big overlap between the initially proposed `faas.trigger.*` fields with the already existing `cloud.*` and `service.` fields.
Allowing to **self-nest cloud and service fields** under `cloud.origin.*` / `cloud.target.*` and `service.origin.*` / `service.target.*`, respectively, would allow to cover most of the `faas.trigger.*` fields.
Copy link
Member

Choose a reason for hiding this comment

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

I propose instead of nesting at _.origin.*, the existing top-level field set represents the origin. The target would be nested at _.target.* as proposed.

This approach continues the pattern adopted for the user field set: user.* and user.target.*. The user/service/entity performing the main action is captured under the top-level with the user/service/entity affected by the action residing at _.target.*.

Example :

{
  "service": {
    "name": "origin-service",
    "target": {
      "name": "target-service"
    }
  }
}

Using the existing top-level fields for the event "doer" lets users continue using existing queries. For example, only querying service.name instead of needing to account for both service.name and service.origin.name.

Copy link
Member

Choose a reason for hiding this comment

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

origin is in addition to service.name, it gives more context as to where the function was invoked from.

CALLEE -> FUNCTION INVOCATION -> OUTGOING CALL

the proposal allows us to set information for all three stages:

service.origin.name -> service.name -> service.target.name

With service.* always being present and relating the the do'er or FUNCTION INVOCATION itself.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, @Mpdreamz, for the follow-up. I also reviewed the trigger examples from elastic/apm#470, and those examples also helped me to understand these FaaS use cases better.

I'm still hesitant that introducing the _.origin.* nestings could create confusion. For example, when a user should select service.name or cloud.service.name versus service.origin.name or cloud.origin.service.name. However, if we define the difference clearly in the ECS docs, we can hopefully avoid confusion between the two.

I have no objection to moving forward with the _.origin.* nestings as proposed. However, can we please summarize what we discussed here as a potential concern in the Concerns section?

rfcs/text/0027-faas-fields.md Show resolved Hide resolved
Copy link
Member

@ebeahan ebeahan left a comment

Choose a reason for hiding this comment

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

Noted a potential concern to capture in #1542 (comment), otherwise LGTM.

@Mpdreamz
Copy link
Member

Thank you @ebeahan!, I've amended the PR with the a note of the concerns raised. Let me know if I did your concerns justice 🙂

@ebeahan
Copy link
Member

ebeahan commented Aug 19, 2021

LGTM - thanks! I'll set the Date: to today's date and merge.

@ebeahan ebeahan merged commit 109e46e into elastic:master Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants