Opentelemetry-specification: cloud.infrastructure_service incosistency

Created on 26 Jan 2021  路  2Comments  路  Source: open-telemetry/opentelemetry-specification

Current state

Cloud semantic conventions specify fields such as:

  • cloud.provider (e.g. aws, azure)
  • cloud.infrastructure_service (e.g. aws_ec2, aws_ecs, azure_vm, etc.)

As can be observed, the values for the latter start with prefix that matches cloud.provider

Incosistency

However, OpenTelemetry Collector resourcedetection processor is using the names without prefix for cloud.infrastructure_service (e.g. EC2, ECS rather than aws_ec2, aws_ecs). Other providers do not support the new tag yet

Possible solutions

  • remove prefix from specification, since cloud.provider already provides this information
  • add prefix to the implementation to make it match the specification

This topic was to be discussed in a separate issue but eventually closed

Additional context.

1059 suggests to make cloud.provider required if any other cloud.*attribute is set.

semantic-conventions p3 allowed-for-ga resource

Most helpful comment

I.e., I think the collector should follow the spec, and not the other way round.

All 2 comments

This topic was to be discussed in a separate issue but eventually closed

This was discussed at https://github.com/open-telemetry/opentelemetry-specification/pull/1112#discussion_r524417409, i.e. on the PR that introduced this attribute. Quoting @arminru for why he suggested adding a prefix:

to avoid naming collisions and to allow for better organized sorting (e.g. in IDE suggestions). The proper display name to be used in UIs is provided in the brief anyway.

E.g. azure_vm was named as being more clear than just vm.

I.e., I think the collector should follow the spec, and not the other way round.

Was this page helpful?
0 / 5 - 0 ratings