Skip to content

Commit

Permalink
Remove component attribute - following open-telemetry#271
Browse files Browse the repository at this point in the history
  • Loading branch information
thisthat committed Apr 1, 2020
1 parent b7f9d56 commit 8944fd4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
9 changes: 4 additions & 5 deletions specification/data-faas.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ This document defines how to describe an instance of a function that runs withou

# General Attributes

Span `name` should be set to the function name being executed. Depending on the value of the `faas.trigger` attribute, additional attributes MUST be set. For example, an `http` trigger MUST follow the [HTTP Server semantic conventions](data-http.md#http-server-semantic-conventions). For more information, refer to the [Function Type](#function-type) section.
Span `name` should be set to the function name being executed. Depending on the value of the `faas.trigger` attribute, additional attributes MUST be set. For example, an `http` trigger SHOULD follow the [HTTP Server semantic conventions](data-http.md#http-server-semantic-conventions). For more information, refer to the [Function Trigger Type](#function-trigger-type) section.

If Spans following this convention are produced, a Resource of type `faas` MUST exist following the [Resource semantic convention](data-resource-semantic-conventions.md#function-as-a-service).

| Attribute name | Notes and examples | Required? |
|---|---|--|
| `component` | Denotes the type of the span and needs to be `"faas"` | Yes |
| `faas.trigger` | Type of the trigger on which the function is executed. <br > It SHOULD be one of the following strings: "datasource", "http", "pubsub", "timer", or "other". | Yes |
| `faas.execution` | String containing the unique execution id of the function. E.g. `af9d5aa4-a685-4c5f-a22b-444f80b3cc28` | No |
| `faas.execution` | String containing the execution id of the function. E.g. `af9d5aa4-a685-4c5f-a22b-444f80b3cc28` | No |

## Difference between execution and instance

Expand All @@ -44,7 +43,7 @@ Therefore, the span attribute `faas.execution` differs from the resource attribu
[Azure functions]: https://docs.microsoft.com/en-us/azure/azure-functions/manage-connections#static-clients
[Google functions]: https://cloud.google.com/functions/docs/concepts/exec#function_scope_versus_global_scope

# Function Type
# Function Trigger Type

This section describes how to handle the span creation and additional attributes based on the value of the attribute `faas.trigger`.

Expand All @@ -62,7 +61,7 @@ For `faas` spans with trigger `datasource`, it is recommended to set the followi


## HTTP
The function responsibility is to provide an answer to an inbound HTTP request. The `faas` span MUST follow the recomandations described in the [HTTP Server semantic conventions](data-http.md#http-server-semantic-conventions).
The function responsibility is to provide an answer to an inbound HTTP request. The `faas` span SHOULD follow the recomandations described in the [HTTP Server semantic conventions](data-http.md#http-server-semantic-conventions).

## PubSub
A function is set to be executed when messages are sent to a messaging system.
Expand Down
13 changes: 7 additions & 6 deletions specification/data-resource-semantic-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ This document defines standard attributes for resources. These attributes are ty
* [Telemetry SDK](#telemetry-sdk)
* [Compute Unit](#compute-unit)
* [Container](#container)
* [Deployment Service](#deployment-service)
* [Function as a Service](#function-as-a-service)
- [Deployment Service](#deployment-service)
* [Kubernetes](#kubernetes)
* [Compute Instance](#compute-instance)
- [Compute Instance](#compute-instance)
* [Host](#host)
* [Environment](#environment)
- [Environment](#environment)
* [Cloud](#cloud)
* [Cluster](#cluster)
* [Version Attributes](#version-attributes)

<!-- tocstop -->

## TODOs

Expand Down Expand Up @@ -108,7 +109,7 @@ Attributes defining a compute unit (e.g. Container, Process, Function as a Servi
| faas.version | The version string of the function being executed as defined in [Version Attributes]. | `semver:2.0.0` | No |
| faas.instance | The execution environment ID as a string. | `my-function:instance-0001` | No |

Note: The resource attribute `faas.instance` differs from the span attribute `faas.execution`. For more information see the [Semantic conventions for FaaS spans](data-faas#difference-between-execution-and-instance).
Note: The resource attribute `faas.instance` differs from the span attribute `faas.execution`. For more information see the [Semantic conventions for FaaS spans](data-faas.md#difference-between-execution-and-instance).

## Deployment Service

Expand Down
5 changes: 1 addition & 4 deletions specification/data-semantic-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,5 @@ The following semantic conventions for spans are defined:
* [HTTP](data-http.md): Spans for HTTP client and server.
* [Database](data-database.md): Spans for SQL and NoSQL client calls.
* [RPC/RMI](data-rpc.md): Spans for remote procedure calls (e.g., gRPC).
<<<<<<< HEAD
* [General](data-span-general.md): General semantic attributes that may be used in describing different kinds of operations.
=======
* [FaaS](data-faas.md): Spans for Function as a Service (e.g. AWS Lambda).
>>>>>>> Split FaaS between Span and Resource attributes
* [FaaS](data-faas.md): Spans for Function as a Service (e.g., AWS Lambda).

0 comments on commit 8944fd4

Please sign in to comment.