Opentelemetry-specification: Confusing Faas semantic conventions for function name

Created on 17 Aug 2020  路  11Comments  路  Source: open-telemetry/opentelemetry-specification

We have Faas conventions in the Resource and in the Trace conventions and they do not fully agree.

Name disagreement

Span name should be set to the function name being executed.

vs

| faas.name | The name of the function being executed.|

~## Execution instance disagreement~

~>| faas.execution | String containing the execution id of the function.~

~vs~

~>| faas.instance | The execution environment ID as a string. |~

semantic-conventions p3 required-for-ga miscellaneous resource trace

All 11 comments

For the second point, the difference between the two fields is described in https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/faas.md#difference-between-execution-and-instance

For the first point, the span name and faas.name are the same value. Since the spans will also run the same code, I don't think that's a problem. What disagreement do you see there?

@thisthat thanks for the link, I misunderstood the execution/instance attributes.

For the first point, the span name and faas.name are the same value. Since the spans will also run the same code, I don't think that's a problem. What disagreement do you see there?

@Oberon00 does it mean that the function name must be recorded both in the span name and in a faas.name attribute? It is hard to tell when the recommendations about the name are in 2 different places. I think it is worth consolidating them.

@Oberon00 do we need the faas.name if we have the same value in the Span.Name()?

@bogdandrutu The requirements for the span name are more relaxed and allow considering other names as well, just like we allow a couple of alternatives in the other semantic conventions. The FaaS spec says:

Span name should be set to the function name being executed.

Since it's not guaranteed that the span name is (only) the name of the executed function, it can only be reliably taken from the faas.name attribute.

@arminru so if I understand correctly what you are saying is that we need faas.name attribute where it is guaranteed that we will have the function name, but there is no guarantees that Span name will contain the function name (although it is very likely). Anybody who needs such guarantee will use faas.name as the source of the data. Independently from that we also say that Span name SHOULD contain the function name because that's the most sensible thing to do.

@tigrannajaryan Yes, exactly! 馃挴

@tigrannajaryan Can we close this issue now that everything seems to be clarified?

Additionally, I think it looks strange if you use the span name as an attribute, because it would be an "unnamed attribute". E.g. you would need to do stuff like "is this an HTTP span? if yes then the span name is probably the route/handler name. If it's an rpc span then it's the qualified function name. If both, then I have no idea what the span name is.". The span name should be used for grouping and maybe as a default display name but interpretation beyond that is not intended, also if you look at the span name spec.

OK, having the attribute and a recommendation to also set span name looks reasonable to me. Let me see if I can add any clarifying wording to prevent the confusion that I had.

Was this page helpful?
0 / 5 - 0 ratings