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

ECS Fields for Function as a Service (FaaS) environments #1516

Closed
AlexanderWert opened this issue Jul 14, 2021 · 6 comments
Closed

ECS Fields for Function as a Service (FaaS) environments #1516

AlexanderWert opened this issue Jul 14, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@AlexanderWert
Copy link
Member

Hi ECS team,

Summary
Using APM agents in the context of serverless environments (e.g. AWS Lambda) allows to capture function as a service (faas) specific context that can be of great value for the end users and provide correlation points with other sources of data.

Are there plans / can we extend ECS to include meta-data fields for faas environments?
The existing specification in OpenTelemetry can serve as a good orientation: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/faas.md#example

Detailed Design:
I'm proposing to add the following fields:

Field Example Description
faas.trigger "http" one of http,pubsub,datasource, timer, other
faas.execution "af9d5aa4-a685-4c5f-a22b-444f80b3cc28" The execution ID of the current function execution.
faas.coldstart true Boolean value indicating a cold start of a function
faas.name "my-lambda-function" the name of the function
faas.id "arn:aws:lambda:us-west-2:123456789012:function:my-lambda-function" The ID of the function
faas.version "semver:2.0.0" The version of the function
faas.instance "my-lambda-function:instance-0001" The instance of the function
@AlexanderWert AlexanderWert added the enhancement New feature or request label Jul 14, 2021
@djptek
Copy link
Contributor

djptek commented Jul 14, 2021

Hi @AlexanderWert as this involves a new Field Set, please could you follow the RFC process documented here:

https://github.com/elastic/ecs/blob/master/rfcs/README.md

Thanks!

@djptek
Copy link
Contributor

djptek commented Jul 15, 2021

Thanks for opening RFC FaaS Fields - Stage 0 @AlexanderWert I'll close this issue so we can follow up with your PR

@cyrille-leclerc
Copy link
Contributor

@axw did we map OpenTelemetry FaaS attributes to these new ECS fields?

@axw
Copy link
Member

axw commented Aug 24, 2021

@cyrille-leclerc I have not, but I believe @AlexanderWert may have. IIANM, OTel has an extra field or two (e.g. faas.max_memory). We intend to map some FaaS fields to our existing service and transaction fields.

@AlexanderWert
Copy link
Member Author

@cyrille-leclerc The faas ECS fields proposal is now in RFC stage 2. Once the process is finished and the fields are in ECS, the mapping should be the following:

OTel ECS
cloud.provider cloud.provider
cloud.region cloud.region
faas.trigger faas.trigger.type
faas.execution faas.execution
faas.coldstart faas.coldstart
faas.name service.name
faas.id service.id
faas.version service.version
faas.instance service.node.name

@cyrille-leclerc
Copy link
Contributor

Thanks @AlexanderWert . Did you understand why Otel decided to differentiate faas.name /faas.version from service.name / service.version ? I didn't have the time to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants