setUserContext()

in packages/rum-core/src/common/config-service.js [142:156]


  setUserContext(userContext = {}) {
    const context = {}
    const { id, username, email } = userContext

    if (typeof id === 'number' || typeof id === 'string') {
      context.id = id
    }
    if (typeof username === 'string') {
      context.username = username
    }
    if (typeof email === 'string') {
      context.email = email
    }
    this.config.context.user = extend(this.config.context.user || {}, context)
  }