groups:
  - id: peer
    prefix: peer
    type: span
    brief: "Operations that access some remote service."
    attributes:
      - id: service
        type: string
        brief: >
          The [`service.name`](/docs/resource/README.md#service)
          of the remote service. SHOULD be equal to the actual `service.name`
          resource attribute of the remote service if any.
        examples: "AuthTokenCache"
  - id: identity
    prefix: enduser
    type: span
    brief: >
      These attributes may be used for any operation with an authenticated and/or authorized enduser.
    attributes:
      - id: id
        type: string
        brief: >
          Username or client_id extracted from the access token or
          [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2)
          header in the inbound request from outside the system.
        examples: 'username'
      - id: role
        type: string
        brief: 'Actual/assumed role the client is making the request under extracted from token or application security context.'
        examples: 'admin'
      - id: scope
        type: string
        brief: >
          Scopes or granted authorities the client currently possesses extracted from token
          or application security context. The value would come from the scope associated
          with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3)
          or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
        examples: 'read:message, write:files'
  - id: thread
    type: span
    brief: >
      These attributes may be used for any operation to store information about a thread that started a span.
    attributes:
      - ref: thread.id
      - ref: thread.name
  - id: code
    type: span
    brief: >
      These attributes allow to report this unit of code and therefore to provide more context about the span.
    attributes:
      - ref: code.function
      - ref: code.namespace
      - ref: code.filepath
      - ref: code.lineno
      - ref: code.column
