-
Notifications
You must be signed in to change notification settings - Fork 415
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
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9e2bc8b
Faas fields RFC to stage 1
AlexanderWert 6e1bc6b
Refactored proposal
AlexanderWert 305d561
link to stage 1 itself
Mpdreamz 942b70e
Merge branch 'master' into faas-stage-1
Mpdreamz be84f19
Ammend with concerns raised
Mpdreamz 61d8fc4
Merge branch 'master' into faas-stage-1
Mpdreamz f6307fc
Merge branch 'master' into faas-stage-1
ebeahan 23623c9
set date
ebeahan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: cloud | ||
reusable: | ||
top_level: true | ||
expected: | ||
- at: cloud | ||
as: target | ||
short_override: Cloud information about the invocation target. | ||
- at: cloud | ||
as: origin | ||
short_override: Cloud information about the invocation origin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
- name: faas | ||
title: Function as a Service | ||
group: 2 | ||
short: Fields for function as a service executions. | ||
description: > | ||
Fields related to serverless execution contexts and invocations of | ||
function as a service resources such as AWS Lambda, Azure functions, | ||
Google Cloud Functions, etc. | ||
type: group | ||
fields: | ||
- name: execution | ||
level: extended | ||
example: af9d5aa4-a685-4c5f-a22b-444f80b3cc28 | ||
type: keyword | ||
short: The execution ID. | ||
description: > | ||
Uniquely identifies an invocation of a serverless function. | ||
- name: trigger.type | ||
level: extended | ||
type: keyword | ||
short: The type of the trigger a function invoction is resulting from. | ||
description: > | ||
Serverless functions can be triggered through different types of upstream services, | ||
such as API gateways, message queues, change events on storage files, etc. | ||
This field specifies the type of the trigger. | ||
example: http | ||
allowed_values: | ||
- name: http | ||
description: > | ||
This value indicates a function invocation triggered through an HTTP request. | ||
For example, on AWS, `trigger.type` is set to the value `http` if an API Gateway | ||
triggers a Lambda function. | ||
- name: pubsub | ||
description: > | ||
This value indicates a function invocation triggered through a message being received. | ||
For example, on AWS, `trigger.type` is set to the value `pubsub` if a Lambda function | ||
is triggered by an SQS or an SNS message. | ||
- name: datasource | ||
description: > | ||
This value indicates a function invocation triggered by an event that results from a | ||
change on a datasource. | ||
For example, on AWS, `trigger.type` is set to the value `datasource` if a Lambda function | ||
is triggered by a change on a S3 bucket or file. | ||
- name: timer | ||
description: > | ||
This value indicates a scheduled function invocation. | ||
For example, on AWS, `trigger.type` is set to the value `timer` if a Lambda function | ||
is triggered by a scheduled CloudWatch event. | ||
- name: other | ||
description: > | ||
This value is used if a function invocation does not fit into any of the explicit | ||
`trigger.type` categories. | ||
- name: trigger.request_id | ||
level: extended | ||
example: zf7d5cb3-a685-4c5f-a22b-745f80b3dx49 | ||
type: keyword | ||
description: > | ||
The unique request ID of the trigger event for a function invocation. | ||
- name: coldstart | ||
level: extended | ||
type: boolean | ||
example: true | ||
short: Indicates a cold start of a function. | ||
description: > | ||
Boolean value indicating a cold start of a function invocation. | ||
A function invocation leads to a cold start if the serverless | ||
runtime needs to be created and started before the actual request can be handled. | ||
Requests that hit active serverless runtimes do not suffer from a cold start. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: service | ||
reusable: | ||
top_level: true | ||
expected: | ||
- at: service | ||
as: target | ||
short_override: Target service of an invocation. | ||
- at: service | ||
as: origin | ||
short_override: Origin service of an invocation. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.*
anduser.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 :
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 bothservice.name
andservice.origin.name
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
origin
is in addition toservice.name
, it gives more context as to where the function was invoked from.the proposal allows us to set information for all three stages:
With
service.*
always being present and relating the thedo'er
orFUNCTION INVOCATION
itself.There was a problem hiding this comment.
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 selectservice.name
orcloud.service.name
versusservice.origin.name
orcloud.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 theConcerns
section?