semantic-conventions icon indicating copy to clipboard operation
semantic-conventions copied to clipboard

Add agent semantic conventions

Open tigrannajaryan opened this issue 1 year ago • 4 comments

This is a draft that I am opening to start discussion about agent semantic conventions. We will need input from semconv SIG and from Collector SIG.

Resolves https://github.com/open-telemetry/semantic-conventions/issues/396 Contributes to https://github.com/open-telemetry/opamp-spec/issues/131 Alternate to https://github.com/open-telemetry/semantic-conventions/pull/575 which did not get traction.

Changes

We need a way to record more information about agents than is currently possible using existing semantic conventions. Otel Collector in particular today uses service.name,service.instance.id,service.version attributes to report its own telemetry. These are useful but not sufficient, particularly we are missing the information about which distribution of Otel Collector it is.

The proposed agent.type,agent.version,agent.id conventions are also aligned with ECS: https://www.elastic.co/guide/en/ecs/current/ecs-agent.html

With introduction of this conventions the following attributes change in Otel Collector's own telemetry output:

service.name -> agent.type service.version -> agent.version service.instance.id -> agent.id

agent.distro is added as one more property, the equivalent of which did not exist in the past.

Usage

Case 1. Own Telemetry.

The agents will use these attributes in the Resource of the telemetry they about themselves.

Case 2. OpAMP.

These will be used as identifying attributes of the agent in OpAMP.

Merge requirement checklist

I will add changelog/schema after we agree to move forward with this proposal.

tigrannajaryan avatar Apr 23 '24 17:04 tigrannajaryan

@open-telemetry/collector-approvers @open-telemetry/collector-contrib-approvers @open-telemetry/opamp-spec-approvers @open-telemetry/opamp-go-approvers Please review.

tigrannajaryan avatar Apr 23 '24 17:04 tigrannajaryan

Can you clarify if this should also encompass additional attributes, such as additional metadata related to the collector build or the OS the collector runs on, or is that out of scope and defined elsewhere?

atoulme avatar Apr 24 '24 15:04 atoulme

Can you clarify if this should also encompass additional attributes, such as additional metadata related to the collector build or the OS the collector runs on, or is that out of scope and defined elsewhere?

@atoulme For things like OS I think we should use existing conventions, e.g. os.type, etc. That's what OpAMP recommends.

If there are other additional attributes that you would want to record for Collector we should either add them as more agent.* attributes if they are for agents only or suggest them as general conventions if they are applicable to other service types.

tigrannajaryan avatar Apr 29 '24 15:04 tigrannajaryan

@open-telemetry/opamp-spec-approvers @open-telemetry/opamp-go-approvers please take a look and comment.

tigrannajaryan avatar May 02 '24 16:05 tigrannajaryan